ttt 4 display board rb cb gh 000 源码
显示井字棋盘 概述 井字棋盘可以由9个字符串元素组成的数组来表示,其中包含棋盘中该单元格的状态。 空板将是: board = [ " " , " " , " " , " " , " " , " " , " " , " " , " " ] 如果我们调用display_board并将该board作为参数传递,则期望以下结果: board = [ " " , " " , " " , " " , " " , " " , " " , " " , " " ] display_board ( board ) # Would Print: # | | # ----------- # | | # ----------- # | | 中间带有“ X”的板: board = [ " " , " " , " " , " " , "X" , " " , "
用户评论