文件名称:ttt-4-display-board-rb-v-000
文件大小:10KB
文件格式:ZIP
更新时间:2024-03-16 20:36:14
Ruby
显示井字棋盘 概述 井字棋盘可以由9个字符串元素组成的数组来表示,其中包含棋盘中该单元格的状态。 空板将是: board = [ " " , " " , " " , " " , " " , " " , " " , " " , " " ] 如果我们调用display_board并将该board作为参数传递,则期望以下结果: board = [ " " , " " , " " , " " , " " , " " , " " , " " , " " ] display_board ( board ) # Would Print: # | | # ----------- # | | # ----------- # | | 中间带有“ X”的板: board = [ " " , " " , " " , " " , "X" , " " , "
【文件预览】:
ttt-4-display-board-rb-v-000-master
----.gitignore(642B)
----.rspec(53B)
----LICENSE.md(1KB)
----CONTRIBUTING.md(2KB)
----spec()
--------display_board_spec.rb(6KB)
--------spec_helper.rb(216B)
----README.md(15KB)
----lib()
--------display_board.rb(80B)
----Gemfile(115B)
----.learn(140B)
----Rakefile(338B)
----Gemfile.lock(689B)