All pastes #47303 Raw Edit

NaeRey

public text v1 · immutable
#47303 ·published 2006-03-28 14:53 UTC
rendered paste body
program tris;
uses crt;
const 
d:='     '
dd:='      |     ';
var nw,n,ne,w,c,e,sw,s,se:char;x,y,where:string;who:integer;

begin
	writeln('Benvenuto! Come si chiama il PrimoGiocatore (Croce)?');readln(x);
	writeln('Ed il secondo(cerchio)?');readln(y);
	repeat;
	clrscr;
	writeln;writeln;
	writeln('    ',nw,'   |    ',n,'   |    ',ne);
	writeln('----------------------------');
	writeln('    ',w,'   |    ',c,'   |    ',e);
	writeln('----------------------------');
	writeln('    ',sw,'   |    ',s,'   |    ',se);
	writeln;writeln;
	who:=who+1;
	if (who MOD 2) then begin
		whoT:=x;
		roba:='X';
	end
	else begin
		whoT:=y;
		roba:='O';
	end;
	writeln('E il tuo turno, ',whoT,'!!');
	writeln('Dove vuoi scrivere?');
	writeln;
	writeln('    nw   |    n   |    ne');
	writeln('------------------------');
	writeln('    w     |    c   |     e');
	writeln('------------------------');
	writeln('    sw   |    s    |    se');
	writeln;
	readln(where);
	IntToStrDef(where, roba);
	until (nw=n=ne) or (w=c=e) or (sw=s=se) or (sw=c=ne) or (nw=c=se);