Calculate the scoring polynomial for a plain with a given win value.

Calculate the scoring polynomial for a plain with a given win value. More...


Files

file  p_plain.c
 Calculate the scoring polynomial for a plain with a given win value - source file.

Functions

int bitcount_1 (ushort iplain)
 Count the number of bits on in a plain.
int p_plain_1 (short a_plain, short b_plain, short value)
 Calculate the scoring polynomial for a plain with a given win value.

Detailed Description

Calculate the scoring polynomial for a plain with a given win value.


Function Documentation

bitcount_1 ushort  iplain  ) 
 

Count the number of bits on in a plain.

Parameters:
iplain ushort : value of the plain.
Returns:
int : the number of bits on (= 1) in the plain.

p_plain_1 short  a_plain,
short  b_plain,
short  value
 

Calculate the scoring polynomial for a plain with a given win value.

Parameters:
a_plain short : value of plain for player 1.
b_plain short : value of plain for player 2.
value short : win value to be checked for.
Returns:
int : polynomial score for the plain with a given win value.


Generated on Sat Sep 24 09:00:12 2011 for ScoreFour by  doxygen 1.4.5