s40923224 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • 首頁
  • HW1
    • IPv4 與 IPv6 地址
      • Overview 總覽-1
      • TCP and IP TCP與IP
      • IPv4 and IPv6 Addresses IPv4 與 IPv6 位址
      • IPv4 Addressing IPv4 位址
      • Addressing Notation 尋址符號
      • Network and Host Addresses 網絡和主機地址
      • IPv4 Address Classes IPv4地址類別
      • IPv4 Data Flows IPv4數據流
      • Assigning an IP Address 分配IP地址
      • Benefits of IPv6 IPv6的好處
      • IPv6 Address Structure IPv6地址結構
      • IPv6 Data Flows IPv6數據流
    • TCP 與 UDP 協議
      • Overview 總覽-2
      • TCP and UDP TCP與UDP
      • TCP Vs. UDP
      • TCP Windowing TCP窗口
      • Networking Transfer Protocols 網絡傳輸協議
  • HW2
  • HW3
    • Concepts 概念
    • MAX OF THREE 最多三人
    • Tic Tac Toe Game 井字遊戲
  • 心得
  • 自評分數60
MAX OF THREE 最多三人 << Previous Next >> 心得

Tic Tac Toe Game 井字遊戲


In 3 previous exercises, we built up a few components needed to build a Tic Tac Toe game in Python:

在之前的3個練習中,我們建立了一些用Python構建Tic Tac Toe遊戲所需的組件:

1.Draw the Tic Tac Toe game board   畫井字遊戲板

2.Checking whether a game board has a winner  檢查遊戲板是否有贏家

3.Handle a player move from user input   處理玩家從用戶輸入的移動

The next step is to put all these three components together to make a two-player Tic Tac Toe game! Your challenge in this exercise is to use the functions from those previous exercises all together in the same program to make a two-player game that you can play with a friend. There are a lot of choices you will have to make when completing this exercise, so you can go as far or as little as you want with it.

下一步是將所有這三個組成部分放在一起,組成一個兩人遊戲的Tic Tac Toe遊戲!在本練習中,您面臨
的挑戰是在同一程序中一起使用以前的練習中的功能,以製作一個可以與朋友一起玩的兩人遊戲。完成本
練習時,您將有很多選擇,因此您可以根據自己的需要進行選擇。

Here are a few things to keep in mind: 

請記住以下幾點:
  • You should keep track of who won - if there is a winner, show a congratulatory message on the screen.
  • 您應該跟踪誰贏了-如果有贏家,則在屏幕上顯示祝賀消息。
  • If there are no more moves left, don’t ask for the next player’s move!
  • 如果再也沒有其他動作,請不要要求下一個玩家的動作!

As a bonus, you can ask the players if they want to play again and keep a running tally of who won more - Player 1 or Player 2.

作為獎勵,您可以詢問玩家是否想再次玩,並保持連續統計誰贏得了更多的獎金-玩家1或玩家2。




MAX OF THREE 最多三人 << Previous Next >> 心得

Copyright © All rights reserved | This template is made with by Colorlib