
    Mg%	                     j    S SK r S SKJr  S SKrS SKrS SKJrJrJr  S SKJ	r	  S r
\" S5      S 5       rg)    N)
RandomWord)plugincompleterequire)Forec                 8    [        5       nUR                  U S9nU$ )N)starts_with)r   word)letterrnew_words      >/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/wordgame.pygenerateWordr   
   s    AVVV'HO    	word_gamec           	         [         R                  " S5      nSnUS:X  d  US:X  Ga  [        U R                  S[        R
                  S95      n[        U R                  S[        R
                  S95      nSn U R                  S[        R
                  S9nUR                  U5      (       a  [        U5      S	:  d  O U R                  S
[        R                  S9  Md  Xe::  Ga  U R                  S[        U5      -   [        R                  S9  [        U[        U5      S-
     5      nU R                  SU-   [        R                  S9  [        R                  " 5       n	U R                  S[        U[        U5      S-
     5      -   S-   [        U5      -   S-   [        R
                  S9n[        R                  " 5       n
X-
  nUS-  nX:  a  U R                  S[        R                  S9  OUS   U[        U5      S-
     :w  a  U R                  S[        R                  S9  OLUR                  U5      (       a  [        U5      S	:  a  U R                  S[        R                  S9  OXe::  a  GM  Xe:  a-  U R                  S[        U5      -   S-   [        R                  S9  U R                  S5      nUS:X  a  GM  US:X  a  GM  g g )Nen_USYyzCGive how many seconds you would like to have to find your answers 
)colorz=Give the number of rounds after which you will win the game 
   zGive a word: 
   zGive a proper word!zRound zJarvis' answer is: z'Give a word starting with the letter: "z" , You have z seconds to answer! 
z'You were too late to answer! You lost. r   zIYour word does not start with the last letter of jarvis' word! You lost. zWrong word! You lost. zCongratulations! You won all z rounds against jarvis!z@If you want to continue playing press Y/y, otherwise press N/n 
)enchantDictintinputr   GREENchecklensayREDstrYELLOWr   time)jarvissdcontinue_playingmax_seconds_to_answerroundscurrent_roundsr
   jarvis_answer
start_timeend_timetime_to_answers               r   r   r      s   WA
C
#3S#8!&,,/u  }A  }G  }G,  #H  I6<< `gkgqgq<rs/djjAD3t9Q;

0txx
@  $JJxN 33$++JF&tCIaK'89MJJ,]:JMyy{JH][^_l[mno[oMpIqq  sC  C  DG  H]  D^  ^  _w  w  ~B  ~H  ~H  IDYY[H#.NAN3

D488
TAwc-&8&:;;

fmqmumu
vGGDMMc$ik

3$((
C+ $.  JJ6s6{BC\\cgcncnJo&ijM C
#3S#8#8r   )requestswonderwordsr   r$   r   r   r   r   coloramar   r   r    r   r   <module>r4      s:     "   , , 
 *k *kr   