Sponsored Content
Full Discussion: Reversi Game - Function help
Top Forums Programming Reversi Game - Function help Post 302172084 by Octal on Sunday 2nd of March 2008 10:33:04 AM
Old 03-02-2008
Quote:
Originally Posted by Raffles
Code:
while (x1 < xmax || x1 > xmin || y1 < ymax || y1 > ymin)

What if, x1 is greater than xmax and y1 is also greater than ymax (or indeed, less than ymin)?

Wouldn't your statement resolve to TRUE?
After trying '&&' instead of '||', I noticed that the function doesn't work correctly for black's, or white's moves.
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Game Programming? Help!!

I am interested in learning how to write code for games. I am a C.S. student at UNO but I am in freshman classes and they are so slow. Can anyone recommend any languages to start learning first or any other ways to get started? I have Unix with Solaris in the labs at school and I also have... (4 Replies)
Discussion started by: bjm2020
4 Replies

2. Shell Programming and Scripting

The Game Problom

weh i type in sudo shutdown nowit dose not le me shut down can i override this with out tyoing in -h :confused: my web site in the makeing is also wantin ga gane code for unix and well as a shut domne hwlp (3 Replies)
Discussion started by: thepicoman
3 Replies

3. Programming

Tetris Game in C++

Open Source Project: https://github.com/yongye/cpp Ported from the shell: Shell (0 Replies)
Discussion started by: complex.invoke
0 Replies

4. Programming

Game script

Hi everyone, I need some help seriously. The game is in text mode. It will be based on questions and answers and simple commands. A menu containing options of the game including: 1-Create a new player. 2-Identify as existing player. 3-Launch a new game: this action opens a new game for an... (1 Reply)
Discussion started by: NaimZero
1 Replies
PLIMAGE(3plplot)						    PLplot API							  PLIMAGE(3plplot)

NAME
plimage - Plot a 2D matrix using color map1 with automatic colour adjustment SYNOPSIS
plimage(idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax) DESCRIPTION
Plot a 2D matrix using color palette 1. The color scale is automatically adjusted to use the maximum and minimum values in idata as val- uemin and valuemax in a call to plimagefr(3plplot). Redacted form: General: plimage(idata, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax) This function is used in example 20. ARGUMENTS
idata (PLFLT**, input) A 2D array of values (intensities) to plot. Should have dimensions idata[nx][ny]. nx, ny (PLINT, input) Dimensions of idata xmin, xmax, ymin, ymax (PLFLT, input) Plot coordinates to strecth the image data to. idata[0][0] corresponds to (xmin, ymin) and idata[nx - 1][ny - 1] corresponds to (xmax, ymax). zmin, zmax (PLFLT, input) Only data between zmin and zmax (inclusive) will be plotted. Dxmin, Dxmax, Dymin, Dymax (PLFLT, input) Plot only the window of points whose plot coordinates fall inside the window of (Dxmin, Dymin) to (Dxmax, Dymax). AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere. SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources. August, 2012 PLIMAGE(3plplot)
All times are GMT -4. The time now is 06:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy