Fight Game

Fight Game
Brian Kessler
Basics
 This game is a two player text based fighting game,
simply named ‘fight’. Each player takes their turn,
choosing a move from a list to attack the other
player with. The moves are probability based; the
weakest hitting the most often, and the most
powerful the rarest to hit.
Basics
 The game has 2 parts, a server and a client. The
server chooses a port (over 1024), while the client
connects using the servers IP address or hostname,
and the same port. Once connected, the program
forms a socket connection between the two
computers. The server keeps track of everything,
through its own calculations, and those of the
client.
Block Diagram
Block Diagram
 1) The game starts, by prompting each player to
read the rules.
 2) If they chose yes, they can read the rules, if not,
the game begins with player 2 starting
 3) From the play 2 state, an input is taken. If it is 9,
the game ends. If no, the client program sends the
value of the input, and a second generated number to
the server. The second number represents the
damage if damage was given, if not, it represents the
life restored, or other instructions for the server. The
server decides what to do, based on both of the
inputs. The client also displays text to player 2
describing what happened.
Block Diagram
 4) The server deciphers the inputs from the client, and
displays text to tell player 1 what player 2 has done. The server
the prompts player one for their move, and generates a second
number based on that. Both these are sent to the client, who
deciphers and displays
 5) The server then goes into its update state, where it checks
to see if any scores are 0 or below. If so, it goes to the end state
and sends this info to the client, which does the same.
 6) If the game isn’t over, 4 integers are sent to the client,
allowing it to update the scores in its memory, and update the
counter based on the forth move. Both Players then display this
information.
 7) Game returns to step 3, player 2’s turn.
Screen Shots
Screen Shots