add outout class and output test
add test of fourth part and finish game in teminal