diff --git a/CompleteApps/TicTacToeGame/README.md b/CompleteApps/TicTacToeGame/README.md new file mode 100644 index 0000000000000000000000000000000000000000..630c4ac1e0d9ec3dccc6bcff20d6823c32b90172 --- /dev/null +++ b/CompleteApps/TicTacToeGame/README.md @@ -0,0 +1,54 @@ +# Tic-Tac-Toe + +##### Introduction + +This sample is developed using Java. Tic-Tac-Toe is a simple and fun game for two players. It is played on a 3 x 3 grid. Each player's goal is to make three in a row. In this sample app, you can directly select a device on the same LAN to join the game. + +##### Usage + +1. ###### Starting the Game + + Touch **Start** on the home screen of the sample app to view the devices in the same network, select a device, and touch **OK** to start the FA on that device to join the game. + + + +2. ###### Playing the Game + + Touch any open square in the 3 x 3 grid. The corresponding mark, **X** or **O**, is automatically filled. + + The upper left corner of the app shows whether your current mark is **X** or **O**. + + When it's your turn to mark the space, the corresponding icon in the upper left corner will shake and the timer below will start to count. When it's the turn for your opponent, your touch does not take effect. + + + +3. ###### Showing the Game Result + + The first player to make three of their own mark in a row vertically, horizontally, or diagonally wins the game. If a party does not mark any space within the specified time, then the other party wins. A dialog box indicating that the party has won the game is displayed to the winner, and a dialog box indicating that the party has lost the game is displayed to the loser. If all nine squares are filled and neither player has three in a row, the game is considered a tie. A dialog box indicating that the game ends in a tie is displayed to both parties. + + + +4. Starting the Game Again + + After the game ends, touch the reset button in the lower right corner to play the game again. + + + +5. Returning to the Player Selection Page + + After the game ends, touch the back button in the lower left corner to return to the player selection page. You can select another device to start the game. + + + +##### Constraints + +1. Compilation Constraints + + Set up the DevEco Studio development environment. + + For details, see [Building the Development Environment](https://developer.harmonyos.com/en/docs/documentation/doc-guides/installation_process-0000001071425528). + + +2. Usage Constraints + + This sample app requires two phones in the same network, and only two phones can play the game at the same time. diff --git a/CompleteApps/TicTacToeGame/README_zh.md b/CompleteApps/TicTacToeGame/README_zh.md index d30a293330cc0608febd3e83667cf7df6192c5c0..d467beee6ea1d677f1ed3cdf4b975291ccd9d741 100644 --- a/CompleteApps/TicTacToeGame/README_zh.md +++ b/CompleteApps/TicTacToeGame/README_zh.md @@ -43,19 +43,12 @@ ##### 约束与限制 1. 编译约束 - 已实名认证的开发者联盟账号 ,具体[参考](https://developer.huawei.com/consumer/cn/ ) - 开发工具:DevEcoStudio 下载地址 [HUAWEI DevEco Studio - HarmonyOS应用开发官网](https://developer.harmonyos.com/cn/develop/deveco-studio#download) - •安装DevEco Studio + ​ 设置DevEco Studio开发环境。 - 设置DevEco Studio开发环境,DevEco Studio开发环境需要连接到网络,以确保该正常使用。 - 可以根据以下两种情况配置开发环境: - 1).如果您可以直接访问Internet,则只需下载HarmonyOS SDK - 2).如果网络无法直接访问Internet,则可以通过代理服务器进行访问 • 生成密钥并申请证书 - - 具体环境搭建请[参考:](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/installation_process-0000001071425528) - 更多资料请登录HarmonyOS 应用开发[官网:](https://developer.harmonyos.com/cn/) + ​ 具体环境搭建请[参考](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/installation_process-0000001071425528) 。 + 2. 使用限制 - •该应用必须要有两部同一组网内的手机,且只支持同时两部手机进行游戏 + ​ 该应用必须要有两部同一组网内的手机,且只支持同时两部手机进行游戏 diff --git a/CompleteApps/TicTacToeGame/entry/src/main/resources/en/element/string.json b/CompleteApps/TicTacToeGame/entry/src/main/resources/en/element/string.json index 75edaed3ad96e0e0e7d89e7033559cf9dfc4ff98..b6432b92f2a135bb54d5a5871f87d8028f4b6aa9 100644 --- a/CompleteApps/TicTacToeGame/entry/src/main/resources/en/element/string.json +++ b/CompleteApps/TicTacToeGame/entry/src/main/resources/en/element/string.json @@ -18,7 +18,7 @@ }, { "name": "title_label", - "value": "Tic tac toe battle" + "value": "Tic-Tac-Toe" }, { "name": "game_rules", @@ -30,15 +30,15 @@ }, { "name": "rules_info", - "value": "Two players, one with a circle (o) and one with a cross (x), take turns to play their own symbols on the grid of 3 by 3. If they are first connected into a line horizontally, vertically and obliquely, they will win. If both sides play correctly, they will be drawn. This game is actually controlled by the first player. The first player is attacking and the second player is defending." + "value": "Tic-Tac-Toe is a simple and fun game for two players. It is played on a 3 x 3 grid. Players take turns placing their Mark, X or O, on an open square in the grid. The first player to make three of their own mark in a row vertically, horizontally, or diagonally wins the game." }, { "name": "rules_info1", - "value": "If the first player is the first player in the corner position, he will win the most. If the second player is in the side position, the first player can tie down the second player with two wires, and then create \"two snakes\". People who have played this game will find that if both players make the best choice, the game will be tied. Therefore, tic tac toe chess is most often used as a children's game." + "value": "Tic-Tac-Toe is a zero-sum game, which means that if both players are playing their best, the game will end in a tie." }, { "name": "confirm_label", - "value": "Confirm" + "value": "OK" }, { "name": "cancel_label", @@ -46,15 +46,7 @@ }, { "name": "add_device_label", - "value": "Add game device" - }, - { - "name": "num0", - "value": "0" - }, - { - "name": "SansSerif", - "value": "sans-serif" + "value": "Add Player" } ] }