use std::cmp::PartialEq;

#[derive(Clone, PartialEq, Debug, RustcEncodable, RustcDecodable)]
pub enum Word {
   Pause,
   Audio(String),
   Video(usize,usize,Vec<(u8,u8,u8)>),
   Touch(i64),
   Embed(Sentence)
}

pub type Sentence = Vec<Word>;
pub fn equals(this: &Sentence, other: &Sentence) -> bool {
   if this.len()!=other.len() { return false; }
   for vi in 0..this.len() {
      if this[vi] != other[vi] { return false; }
   }
   return true;
}

#[derive(Clone)]
pub struct Statement {
   pub timestamp: f64,
   pub source: Word,
   pub content: Sentence,
   pub reach: usize
}

pub type Inbox = Vec<Statement>;
