Main Menu

CCOthello

Started by KingofGamesYami, Aug 13, 2018, 02:25 AM

Previous topic - Next topic

KingofGamesYami

Reposted from here

Othello, otherwise known as Reversi, is a game I've enjoyed for many years. I decided to create it in CC because, to my knowledge, nobody else has.
Download:
pastebin get rMeh1Kag
Future plans:
  • Some sort of turn indicator (whether it is white or black's turn to move) (added in 1.1
  • Some way of determining if there are no possible moves for a player (Ugh...) (added in 1.1) [Toggle-able in 1.2]
  • (Possibly) scale the gameboard, it's a little small (decided not to)
  • AI (Work In Progress) (Added in 1.2)
  • Fix any bugs people report
  • Suggestions?
Current Features:
  • detects valid/invalid moves
  • autoflips game pieces
  • flipping animations
  • determines winner at end of game
1.1
  • counters
  • turn indicator
  • skips player if no moves can be made
  • shows possible move(s)
1.2
  • Arguments (AI, hideMoves)
    -AI allows you to play against an AI as black1
    -hideMoves allows you to play without the possible moves shown
  • Early end game (neither player can move) now handled properly
1.3
  • monitor support
  • toggle show/hide moves in game (m)
1The AI doesn't work on Mimic. I don't know why, I suspect it's got something to do with os.queueEvent.
Instructions:
The game can be run with two three arguments, AI, hideMoves, and monitor. I will briefly outline what they do here:
AI - this engages the built in AI, which moves for black. The AI is not very advanced, and bases it's selections solely on number of pieces it can capture per move.
hideMoves - by default, the game displays the possible moves. This argument disables the feature, since some may want to play without it.
monitor - will search for a monitor, and if found, redirect to it. It will also attempt to scale the game, if your monitor is large enough.
The game contains 1 keybind: m.
m toggles hiding/showing moves on and off.
I'm a ComputerCraft veteran with over 3k posts on the old ComputerCraft Forum.  I'm mostly inactive in CC having moved on to bigger, more interesting projects but still contribute to the community.