Python代写:COMP1011 Tic-Tac-Toe Game System Design




This document describes the functionalities of the system and its design requirements.

As first introduced in the Lab_Exercise_1, Tic-Tac-Toe is a simple game for two players. In this assignment, you will implement a text-based Tic-Tac-Toe (TTT) game system that offers two game modes: 1) two human players playing against each other and 2) one human player playing against a built-in computer player in the game system. Your mission is to ensure the game playing is straightforward and easy to use.

This game is played on the “console.” That is, it is played in a UNIX terminal like in Linux and MACOS or a Windows command window. You are required to perform a storytelling/storyboard analysis to identify different components (also called subsystems ) in this game system. Each subsystem corresponds to one specific functionality/role/actor/character depending on how you analyze the interactions within the game system.

For example, the TTT Drawing Subsystem that you implemented in the Lab_Exercise_1 is the subsystem responsible for displaying and drawing the game board during the game. So the functionality of TTT Drawing Subsystem is to show and draw the game board and other complex drawings needed for the game system. It, in fact, should be a collection of functions. The main control of the game system, or, the game host, will invoke these functions when showing some complex drawings, say, the game board, are needed. Another way to describe the TTT Drawing Subsystem is that it functions like a local “library” for the game system .

Assignment Requirements

Functional Requirements

  1. The (game) system provides a system welcome message and shows instructions on how to play this game. (10%)
  2. The system provides a virtual dice to allow the players to decide the order of playing. (5%)
  3. The system has the functionality of two humans to play the game against each other. (10%)
  4. The system also has the functionality of one human to play against the built-in computer player. (5%)
  5. The system has a built-in computer player that will try to win when winning is possible. (20%)
  6. During the game, the system checks and reports the outcome after each move by either player. The outcome could be a win, a draw, or a state of still in progress. (10%)
  7. When the user enters the wrong input, the system will reject the input and request a re-submission. (5%)
  8. Additional Requirement
    • User interaction design consideration: the system should be easy to understand and easy to follow. (10%)
    • The information of the current state/stage of the game is available to the user.
      • The current state of the game (i.e., win, draw, or in progress), if available.
      • The current game board, if available.
      • Whose turn now, if available.
      • Other information you think that is necessary for playing.
    • To interact:
      • Are the instructions clear?
      • Easy to perform the requested infractions without mistakes or confusion?

Required system execution flow of the game system

  1. The system starts with a system welcome message.
  2. Explain and provide the system commands to the user. If the user enters an incorrect command, explain and provide the system commands again. Here are the system commands. When the system command is 0, then exit the program. When the system command is 1, go to step 3.
  3. The system then asks the user to select the game mode. If the user enters an incorrect game mode command, explain and provide the game mode command screen again. Here are the game mode commands: When the user enters incorrect input, the system will ask the user to re-enter the selection.
  4. Next, the system will interact with the user(s) to determine the play order by throwing a virtual dice. Make sure to explain the rule for determining the play order. The play order must be determined after completing this step. Then, go to step 5.
  5. The tic-tac-toe game starts. During the game, the players take turns to select the cell he/she/it wants to take over. The system will accept the input from the player each time and then shows the current game board. If there is a win, the system will announce it and then go to step 2. Otherwise, the system will continue until all cells on the game board are filled. When this happens, the system will announce a draw and then go to step 2.

When the user enters incorrect input, the system will ask the user to re-enter.

Extra features

  • While not changing the main execution flow as described in the last section, new features and functionalities can be added into the system. There are no extra bonus points will be given though. In general, I do not encourage you to do this unless you have extra time and you are really interested in this. You are welcome to talk to me and discuss it.
  • For those who offer exceptional 4 easy-to-understand and easy-to-use interaction experience, one will also receive extra bonus points of no more than 20% of the total marks. There is no specific rule for this, except it has to be meaningful and useful for the user. For example, an extra-long passage of the TTT game introduction and explanation does not award extra points simply because extra texts are provided. It must serve some genuine useful functions for general users to use your system. In general, I do not encourage you to do this unless you have extra time and you are really interested in this. You are welcome to talk to me and discuss it.