v e r s i o n = 1 
 
 l e f t t o r i g h t = t r u e 
 
 a u t h o r = D a v i d   l e   R o u x 
 
 p o e m = t r u e 
 
 
 
 # i f n d e f   B U T T O N L I N E _ H   
 
 # d e f i n e   B U T T O N L I N E _ H   
 
 c l a s s   B u t t o n P o i n t   
 
 {   
 
 p u b l i c :   
 
 i n t   x ;   
 
 i n t   y ;   
 
 B u t t o n P o i n t ( i n t   a , i n t   b )   
 
 {   
 
 x = a ;   
 
 y = b ;   
 
 }   
 
 
 
 } ;   
 
 c l a s s   B u t t o n L i n e   
 
 {   
 
 
 
 p u b l i c :   
 
 e n u m   d i r e c t i o n   
 
 {   
 
 n o r t h ,   
 
 e a s t ,   
 
 s o u t h ,   
 
 w e s t   
 
 } ;   
 
 i n t *   f r o m x ;   
 
 i n t *   f r o m y ;   
 
 i n t *   t o x ;   
 
 i n t *   t o y ;   
 
 
 
 d i r e c t i o n   d i r ;   
 
 f l o a t   p b u t t o n ;   
 
 b o o l   h o r i z ;   
 
 B u t t o n L i n e ( B u t t o n L i n e *   p r e v , d i r e c t i o n   d , f l o a t   p = 0 . 0 ) ;   
 
 ~ B u t t o n L i n e ( ) ;   
 
 v o i d   r e s i z e ( i n t , i n t ) ;   
 
 v o i d   s e t L e n g t h ( i n t ) ;   
 
 i n t   l e n g t h ;   
 
 
 
 p r i v a t e :   
 
 b o o l   f i r s t ;   
 
 B u t t o n P o i n t *   o n e ;   
 
 B u t t o n P o i n t *   t w o ;   
 
 
 
 
 
 } ;   
 
 # e n d i f 