https://github.com/coding-pelican/omok-c
Simple implementation of the Omok (Five in a Row) game in C
https://github.com/coding-pelican/omok-c
ascii c cli cli-game console console-based console-game five-in-row game gomoku omok terminal terminal-based terminal-game
Last synced: 2 months ago
JSON representation
Simple implementation of the Omok (Five in a Row) game in C
- Host: GitHub
- URL: https://github.com/coding-pelican/omok-c
- Owner: coding-pelican
- License: mit
- Created: 2024-09-15T07:15:36.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T07:37:10.000Z (9 months ago)
- Last Synced: 2025-02-06T08:31:37.501Z (4 months ago)
- Topics: ascii, c, cli, cli-game, console, console-based, console-game, five-in-row, game, gomoku, omok, terminal, terminal-based, terminal-game
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Omok
A simple implementation of the Omok (Five in a Row) game in C.
## Overview
This project implements the classic Omok game, also known as Gomoku or Five in a Row. The game is played on a grid where
two players take turns placing their stones, aiming to get five in a row horizontally, vertically, or diagonally.## Features
- Console-based interface
- 15x15 game board
- Two-player gameplay
- Win detection in all directions## Getting Started
### Prerequisites
- C compiler (e.g., GCC, Clang, or MSVC)
### Building and Running
1. Clone the repository:
```shell
git clone https://github.com/coding-pelican/omok-c.git
```2. Navigate to the project directory:
```shell
cd omok-c
```3. Compile the source code:
```shell
clang main.c omok.c -o omok
```4. Run the game:
```shell
./omok
```## Gameplay
Players take turns placing their stones on the board. The first player to get five stones in a row wins the game.
## Code Structure
The project consists of the following files:
- `main.c`: Entry point of the program
- `omok.c`: Main game logic implementation
- `omok.h`: Header file with function declarations and constants
- `README.md`: This readme file providing an overview of the project## Future Improvements
- Add AI opponent
- Implement game saving/loading
- Enhance user interface## License
This project is released under the MIT License. See the [LICENSE](README.md) file for more details.
## Contributing
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a
pull request.## Contact
For any questions or inquiries, please contact the project author:
- Name: Gyeongtae Kim
- Email:Enjoy playing Omok!