For Extra Credit – Visual Basic Programming
Must be turned in at the BEGINNING of class, or before class, the first class
of Week 10 for credit to be achieved. Remember this is extra-credit and no points
will be taken off if you do not work on this project. I felt this would be
a little exercise which you might enjoy, and that I know you are capable of
completing.
Write a simple Visual Basic Program which will allow two people to play a
game of Tic-Tac-Toe against each other. Try not to make this program any
harder than necessary by reading into more than what is there.
All that is needed: (helpful suggestions)
- Use Buttons that allow the user to select where they want to place their
mark.
- Use a Sub Procedure to determine whose turn it is/next. I’d name it
something like SwitchPlayer()
- Who’s turn it is should be specified by a form level variable.
- Use a Sub Procedure/Function to determine if there was a winner or not.
What is not needed: (helpful suggestions)
- 3D anything – keep it simple, this is a 2D 3×3 tic-tac-toe board
- Top Ten players – or any number of top players for that matter – KIS –
Keep It Simple
What is required: (of the game)
- A 3 x 3 grid – you may use command buttons – which the player will click
on to select.
- A way to check for a win in all possible 8 ways there are to win in Tic-Tac-Toe.
- When one user clicks on a "button" the button will not allow
itself to be changed to the other player, and the computer will
automatically switch to the next player.
- Display in a message box which player is a winner.
Optional Items: just if you have some extra time and want to
make it special…
- Take the players names. Display the name when they win.
- Draw a line through the winning set of "buttons"
- A way to check to see if there is no way for anyone to win –
referred to as a Draw, or in Tic-Tac-Toe, a Cat.
- … you tell me… feel free to expand upon this game as you see fit, feel
free to be creative.
Grading Criteria:
____ ( 10 points) A 3 x 3 grid – which the player will click on to select.
____ ( 15 points) A way to check for a win in all possible ways there are to
win.
____ ( 10 points) When one user clicks on a "button" the button
will not allow itself to be changed to the other player, and the computer will
automatically switch to the next player.
____ ( 5 points) Display in a message box which player is a winner.
____ ( 10 points) Code is well commented about the process which was
used to complete the project, and as to what each section does.
____ ( 25 points) Program performs correctly
____ ( 75 points) Sub Total
____ (25 points max) Extra things you do to make it "better" or
more than what was asked for.
____ Total = Sub-Total + Extra (out of 75) |