Skip to main content

New answers tagged

3 votes

Simple Java Command-line Checkers Game

Do you know these kinds of Memes? The code to build the board is somehow the same. We already know how the board has to look like. Since it is not dynamic, we don'...
Roman's user avatar
  • 2,843
5 votes
Accepted

Simple Java Command-line Checkers Game

Use Java 16 Records Coordinate is a typical transparent data-carrier. record Coordinate(int row, int col) { } Apply Information expert principle ...
Alexander Ivanchenko's user avatar
3 votes

A tic-tac-toe game in C

Goto Considered Harmful With goto, you have stumbled into one of programming's oldest debates (and potentially one of its oldest memes!): if and when ...
Kaia's user avatar
  • 131
18 votes
Accepted

A tic-tac-toe game in C

Unfortunately, it seems like you have stumbled across an older version of The C Programming Language which described a dialect of C now dubbed K&R C. K&R C was superseded by ANSI C (C89), and ...
Rish's user avatar
  • 2,286
6 votes

A tic-tac-toe game in C

Advice I - stdio.h: I was able to compile your code in Visual Studio only via adding #include <stdio.h>. Please, add it to ...
coderodde's user avatar
  • 28.3k
1 vote

Text-based tic-tac-toe in bash (continued)

It is easy to understand the user prompts when running the code -- and fun, too. Here are some minor suggestions. When you described the game as "two-player", I assumed I would be playing ...
toolic's user avatar
  • 3,365
4 votes
Accepted

Linux terminal like parsing

Handle input correctly Your implementation does not handle an empty string correctly (based on the commented out cmd := input[0], which will panic). The input-...
Rish's user avatar
  • 2,286
5 votes
Accepted

Text based tic-tac-toe in bash

The intent here is that an engineer who is not a Bash expert should be able to readily maintain the code some months down the road. I do not know much about bash You might be that future maintenance ...
J_H's user avatar
  • 25.6k
3 votes

Rust: Command line menu in ASCII table

The String Table In this program, all your strings are constants, so you could store them as a const array: ...
Davislor's user avatar
  • 7,371

Top 50 recent answers are included