Re: Fortran 90 Chess
- From: harper@xxxxxxxxxxxxx (John Harper)
- Date: 29 May 2008 11:29:41 +1200
In article <g1ji6u$hat$1@xxxxxxxx>, John <gh14tq5@xxxxxxxxx> wrote:
SELECT CASE (INPUT)
CASE ('P', 'PAWN')
C = 100
CASE ('N', 'KT', 'KNIGHT', 'HORSE')
C = 270
CASE ('B', 'BISHOP')
C = 500
CASE ('Q', 'QUEEN')
C = 900
CASE DEFAULT
CYCLE
END SELECT
Also, I think the case ('P','PAWN') should be case ('R', 'ROOK').
John correctly pointed out that that SELECT CASE needs fixing but
IMHO his fix gives wrong C values for 'R' and 'B'. I suggest
SELECT CASE (INPUT)
CASE ('N', 'KT', 'KNIGHT', 'HORSE')
C = 270
CASE ('B', 'BISHOP')
C = 300
CASE ('R', 'ROOK')
C = 500
CASE ('Q', 'QUEEN')
C = 900
CASE DEFAULT
CYCLE
END SELECT
-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@xxxxxxxxx phone (+64)(4)463 6780 fax (+64)(4)463 5045
.
- Follow-Ups:
- Re: Fortran 90 Chess
- From: dean . menezes
- Re: Fortran 90 Chess
- References:
- Re: Fortran 90 Chess
- From: dean . menezes
- Re: Fortran 90 Chess
- From: samanddeanus
- Re: Fortran 90 Chess
- From: John
- Re: Fortran 90 Chess
- Prev by Date: 1.0d0 stored as integer?
- Next by Date: Re: 1.0d0 stored as integer?
- Previous by thread: Re: Fortran 90 Chess
- Next by thread: Re: Fortran 90 Chess
- Index(es):
Relevant Pages
|
|