Questions tagged [reversi]

52 questions
0
votes
4 answers

Using pointers to change a matrix

In our c course, the teacher has given us a mini project to build a "Reversi" game. I'm having trouble building the board. #define Size 8 int main() { char Board[Size][Size] = { {" "} }; resetBoard(Board); printBoard(Board); …
0
votes
1 answer

Reversi (Othello) Java simple program returns wrong moves

I've been trying to implement simple program that returns valid move of Reversi / Othello game. Unfortunately, it doesn't work and I cannot really see why. It returns [2,2] which is certainly not valid move. //myColor, opponentColor, Reversi move…
Nicke
  • 11
  • 3
0
votes
3 answers

Reversi Game –Move Legality Checking in C programming

The program should ask for user configuration once it initializes the board and then it prints the board using the user configuration. Then it prints the available moves for 'W' & 'B' accordingly. The last step is to ask for a move from the used and…
Sadman Ahmed
  • 105
  • 2
  • 13
0
votes
1 answer

Checking for valid moves in Reversi for all 8 directions

I have a function to check the valid moves in my reversi game. I look at the unoccupied spaces, and check if an adjacent space in any 8 directions are the opposite piece. (If I'm black, I search for white) Now, if I find a piece that's adjacent, I…
Pikapika
  • 1
  • 1
  • 2
0
votes
1 answer

Building Othello game using Tkinter (Python)

How would I go about building an Othello GUI using tkinter in python? Specifically how would I begin by making the initial four pieces show up? How do I get my board to print out the position of a piece when i select a square? So far it prints out…
pawawa
  • 49
  • 1
  • 5
0
votes
1 answer

Python script to test game

I've written a game entitled reversi.py that I want to write a script for to aid in testing. The game is AI based and takes a good amount of time to run. I was hoping to write a script to run the game and output it's results to a file so I could run…
user3416912
0
votes
1 answer

Detecting empty places on reversi board using javascript

I was developing a Reversi (Othello) game and I faced a scenario which I was going to detect empty places on the board. I wrote it but it's not exact. var IsUserTurn = true; var Empty; function InsertBlack(x, y) { var Temp1 =…
Sam
  • 3
  • 1
0
votes
1 answer

Flipping game pieces in Reversi in Java

I cannot get my game to correctly flip the tiles. I have been stuck on this for countless hours and can't seem to figure this out. I have checked other Reversi code examples and unfortunately still no dice. I noticed that whenever I clicked on an…
0
votes
0 answers

Alpha-beta in a Reversi game

I'm implementing the MiniMax algorithm for AI in a Reversi game, and I'm trying to add Alpha-Beta prunning method. If I get it correctly, the AI should choose exactly the same moves like in standard MiniMax, just in a reduced time, thanks to cutting…
Michał Szydłowski
  • 3,261
  • 5
  • 33
  • 55
0
votes
1 answer

Alpha-beta pruning

I've implemented the following MiniMax algorithm for my Android Reversi game: @Override public Field findBestMove(GameBoard gb, int depth, boolean player) { /** maximum depth of search reached, we stop */ if(depth >= max_depth) return…
Michał Szydłowski
  • 3,261
  • 5
  • 33
  • 55
0
votes
1 answer

MiniMax reversi implementation

I'm trying to implement a MiniMax algorithm in a Reversi/Othello game, and I'm pretty stuck, since the function I wrote looks perfectly normal, and yet I get some strange moves, and a crash after a few. Here's the function finding an optimum…
Michał Szydłowski
  • 3,261
  • 5
  • 33
  • 55
0
votes
1 answer

Java Reversi Game Flipping Tiles

I am creating a reversi (othello) game on Java. Included below are my functions for when tiles need to flip to the left, right, below, or above the selected piece. For some reason, whenever a vertical flip is initiated, it ALWAYS works correctly.…
austinstout
  • 1,180
  • 1
  • 11
  • 14
0
votes
1 answer

C pointers in reversi games

I want to that this function after than player 1 puts position program chack where on the left is player's 1 pawn and all of opponent's paws between player's 1 two pawns turning on 'X', like in reversi games. This is whole unfinished…
Lemonngirl
  • 37
  • 1
  • 10
0
votes
0 answers

Client/Server game chat communication in Java

I'm currently working on recreating Othello inside a terminal, and I need some help when it comes to determining whose move it is. I would like only one person to be able to type in their move at a time. Also it should send a message to each player…
-1
votes
1 answer

Reversi will only work in legal tiles but it won't flip in between

I'm writing a Swing implementation of Reversi for APCS. My implementation will only click in legal spots, but it doesn't flip the tiles in between. Why is this and how do I fix it? Here are the relevant sections of code: private int[][] directions =…
robbie
  • 1,219
  • 1
  • 11
  • 25