1. 首页
  2. 数据库
  3. 其它
  4. ttt 4 display board rb cb gh 000 源码

ttt 4 display board rb cb gh 000 源码

上传者: 2021-04-18 07:42:12上传 ZIP文件 9.18KB 热度 9次
显示井字棋盘 概述 井字棋盘可以由9个字符串元素组成的数组来表示,其中包含棋盘中该单元格的状态。 空板将是: board = [ " " , " " , " " , " " , " " , " " , " " , " " , " " ] 如果我们调用display_board并将该board作为参数传递,则期望以下结果: board = [ " " , " " , " " , " " , " " , " " , " " , " " , " " ] display_board ( board ) # Would Print: # | | # ----------- # | | # ----------- # | | 中间带有“ X”的板: board = [ " " , " " , " " , " " , "X" , " " , "
用户评论