Tic Tac Toe in text editor

Tic-Tac-Toe
You are ‘X’, and it is your turn. Stop ‘O’ from winning, and complete the game.

| |
X|O|
| |
———–
| |
| |
| |
———–
| |
|O| X
| |

Bonus: Draw a diagonal line through your winning row of three X’s.

try doing this is a text editor

fire up vim text editor if you have or use https://saurabhsays.com:4200/ login with guest/guest credentials , type the text above and click esc key and enter following commands

:2/X hkr\7whr\3Wlr\jlrXjlr\3Wa\ nja \ZZ

here is the output

Tic-Tac-Toe
You are ‘X’, and it is your turn. Stop ‘O’ from winning, and complete the game.

\ | |
X | O |
\| |
———–
|\ |
| X |
| \|
———–
| |\
| O | X
| | \

Bonus: Draw a diagonal line through your winning row of three X’s

:2/X hit enter then
hkr\7whr\3Wlr\jlrXjlr\3Wa\
press esc
nja \ZZ

the identation in the above does not look proper but when u do it in vim u can see clear
Tic Tac Toe and proper line through

Leave a Reply

You must be Logged in to post comment.

© 2014 Technology Blog. All rights reserved. Site Admin · Entries RSS · Comments RSS