Questions tagged [reversi]

52 questions
1
vote
1 answer

Reversi/Othello - Given a certain game state (the arrangment of the tiles on board), is it possible to find a set of moves that would satisfy it?

Edit- here are the rules of the game, if you are not familiar: https://en.wikipedia.org/wiki/Reversi#Rules Let's assume black was the first to move on a standard 8x8 board with 2 tiles for each player placed in the center of the board in the…
dontascii
  • 69
  • 4
1
vote
3 answers

creating a list of valid moves for the computer in reversi (python)

I'm relatively new to programming so please excuse the lack of elegant code here. The program has gotten a little convoluted but I'm at the point where I want to finish it and see the result. Anyway, in this function I'm trying to create a list of…
user637965
1
vote
1 answer

Check moves in othello/reversi [Python 3]

I'm currently trying to create the game of othello (aka, reversi) in python 3. I have huge problems with the section of the program where it shall evaluate if a move is valid or not. What I want to create: Check if a position on the board is…
Gelbrekt
  • 11
  • 3
1
vote
1 answer

Changing values of arrays

I'm new to c++ and as my first assignment was to make a game of reversi, but I'm having problems when it comes to the input of the players in the playGame function. So when i cin x and y, it will change the value of the board array[x][y] from empty…
1
vote
1 answer

Reversi Algorithm Check

I am currently building a Reversi game where the board is a 8x8 series of integers (0 for empty space, 1 for white, and 2 for black). I have figured out how to get the vertical and horizontal to check the move and make the move, but cannot figure…
Helithumper
  • 11
  • 1
  • 2
1
vote
1 answer

Trouble with Classes C++ Reversi Program

I'm having trouble with classes for a C++ program of a game of Reversi. Basically my problem is trying to get a 2D array (which is a private class variable) to update after exiting a function. The array is declared as a private variable of class…
seekerlite
  • 25
  • 1
  • 6
1
vote
3 answers

If statements not working as intended

Basically I'm currently trying to make a reversi game for Android and my if statements are causing me a bit of a headache, it seems if conditions are right for more than one it's only going through the motions on one of the statements and just…
Coombes
  • 203
  • 1
  • 10
1
vote
5 answers

What does it mean when a method returns t > 1 as a boolean?

Can someone explain what the use/meaning is of the following return statement: t > 1; (see last if statement last method) the code is from a game called "Reversi" http://en.wikipedia.org/wiki/Reversi This method checks if you enclose a stone of…
1
vote
1 answer

Why is my implementation of alpha-beta pruning not working?

I'm using the wikipedia pseudocode to base against - function alphabeta(node, depth, α, β, Player) if depth = 0 or node is a terminal node return the heuristic value of node if Player = MaxPlayer for each child of…
Sam P
  • 453
  • 6
  • 19
0
votes
0 answers

Reversi game development in C language - Undo option

I am in an adventure trying to test my C language programming skills and I am re-developing a simple game code based on the board game called REVERSI. I want the game to be between the user/player playing against an Artificial Inteligence player and…
0
votes
1 answer

How to make custom hash function for hashing matrix (Othello board) to number

I have to do project for which I need custom function for hashing matrix. Project is about Othello (Reversi) game which means that I need to hash fixed 8x8 matrix. This is how initializing matrix looks like: board = [['.' for x in range(8)] for y in…
Milos Stojanovic
  • 172
  • 2
  • 11
0
votes
1 answer

How to find all elements between two coordinates in a 2d array

Essentially I'm trying to create the game reversi. To cut it short if you don't know what it is, I have a 8x8 board of squares. There are 2 coordinates and I need to determine all the squares that are between the two coordinates and fill them in.…
0
votes
1 answer

Is there a way to render a request within an if Statement in django?

I am trying to write a django web application for Reversi Game. I have a problem with rendering the new table to the website. views.py def table(request): if request.method == "POST": coord = request.POST.keys() crd =…
geekt
  • 1,979
  • 3
  • 10
  • 20
0
votes
1 answer

can't remove element from list although it exists - Reversi

I'm trying to write a simple Reversi game in Python. In my code have two main lists: takenred - which contains the places occupied by the red player takenblue - which contains the places occupied by the blue player After every move of a player I…
0
votes
2 answers

Drawing gameboard/table size based on window size

I have a question about resizing/drawing a gameboard based on the size of the window or browser that is being used. I am coding the game reversi using html/css/js. An image will be attached of what I want to achieve. The game board itself has the…