a day
心情很郁闷,吃晚饭都他妈的狗日的混混抢位子,然后那仔就神经不对了,还叫人来,宗明也不帮我,只有打了几下就跑了,真他妈的倒霉透顶。。。
不过以后这种事也不会碰到,现在只想在博客了发泄一下,god bless me 。
心情很郁闷,吃晚饭都他妈的狗日的混混抢位子,然后那仔就神经不对了,还叫人来,宗明也不帮我,只有打了几下就跑了,真他妈的倒霉透顶。。。
不过以后这种事也不会碰到,现在只想在博客了发泄一下,god bless me 。

真的是rp大爆发, 居然月考考了全年级第NINE
不过以后没有这么高的rp了
ps 好像邓飞越来越看我不爽了…
省选挂了, 没事把上次的贪吃蛇改成双人版,
不过好像还是不怎么好玩…
下载地址: http://cgangee.googlecode.com/files/Snake3.zip
{************************************************}
{ }
{ C Gang Snack3 }
{ }
{ by cgangee }
{ The Second Middle School, Chenzhou }
{ }
{************************************************}
program Snack;
uses crt;
const maxx=23;
maxy=39;
maxn=819;
up=1;
down=2;
left=3;
right=4;
type snake=record head,tail,color,direc,score:longint;
body:array[0..maxn]of record x,y:longint; end;
end;
var screen:array[0..maxx,0..maxy]of record data:char; color:longint; end;
speed:longint;
p1,p2:snake;
key:char;
procedure get_food;
var x,y:longint;
begin
repeat
x:=random(maxx+1);
y:=random(maxy+1);
until screen[x,y].data=#32;
screen[x,y].data:=#12;
screen[x,y].color:=magenta;
end;
procedure init;
var i,j,k:longint;
begin
assign(input,'speed.txt'); reset(input);
readln(speed); close(input);
randomize;
textmode(co40);
textbackground(black);
for i:=0 to maxx do
for j:=0 to maxy do screen[i,j].data:=#32;
p1.head:=0;
p1.tail:=0;
p1.color:=white;
p1.direc:=right;
p1.score:=0;
p1.body[0].x:=0;
p1.body[0].y:=0;
screen[0,0].data:=#219;
screen[0,0].color:=p1.color;
p2.head:=0;
p2.tail:=0;
p2.color:=blue;
p2.direc:=left;
p2.score:=0;
p2.body[0].x:=maxx;
p2.body[0].y:=maxy;
screen[maxx,maxy].data:=#219;
screen[maxx,maxy].color:=p2.color;
get_food;
end;
procedure print(data:string; color:longint);
begin
textcolor(color);
write(data);
textcolor(7);
end;
procedure update_screen;
var i,j:longint;
begin
clrscr;
for i:=0 to maxx do
for j:=0 to maxy do print(screen[i,j].data,screen[i,j].color);
write('P1: ',p1.score,' P2: ',p2.score);
end;
procedure printf(s:string);
var i,j:longint;
begin
print(s[1],red);
for i:=2 to length(s) do
begin
if s[i-1]=' ' then print(s[i],red)
else print(s[i],white);
end;
end;
procedure move(var p:snake; e:longint);
var last:longint;
begin
last:=p.head;
p.head:=(p.head+1)mod maxn;
p.body[p.head]:=p.body[last];
case p.direc of
up:p.body[p.head].x:=(p.body[p.head].x+maxx-1)mod maxx;
down:p.body[p.head].x:=(p.body[p.head].x+1) mod (maxx+1);
left:p.body[p.head].y:=(p.body[p.head].y+maxy-1)mod maxy;
right:p.body[p.head].y:=(p.body[p.head].y+1)mod (maxy+1);
end;
case screen[p.body[p.head].x,p.body[p.head].y].data of
#12:begin
screen[p.body[p.head].x,p.body[p.head].y].data:=#219;
screen[p.body[p.head].x,p.body[p.head].y].color:=p.color;
if e=1 then inc(p1.score,9) else inc(p2.score,9);
get_food;
end;
#32:begin
screen[p.body[p.head].x,p.body[p.head].y].data:=#219;
screen[p.body[p.head].x,p.body[p.head].y].color:=p.color;
screen[p.body[p.tail].x,p.body[p.tail].y].data:=#32;
p.tail:=(p.tail+1)mod maxn;
end;
#219:begin
clrscr;
gotoxy(15,13);
print('G',red); print('ame ',white);
print('O',red); print('ver',white);
delay(2000);
clrscr; gotoxy(1,10);
printf('If you want to play again, please press ENTER');
writeln; writeln;
printf('Otherwise press ESC to terminate the program');
repeat key:=readkey; until (key=#13)or(key=#27);
if key=#27 then halt
else init;
end;
end;
end;
procedure next;
begin
if random(1)=0 then
begin move(p1,1); move(p2,2) end
else begin move(p2,2); move(p1,1); end;
end;
begin
init;
while true do
begin
update_screen;
if keypressed then
begin
key:=readkey;
key:=upcase(key);
case key of
#0:begin
key:=readkey;
case key of
#72:if p2.direc<>down then p2.direc:=up;
#80:if p2.direc<>up then p2.direc:=down;
#75:if p2.direc<>right then p2.direc:=left;
#77:if p2.direc<>left then p2.direc:=right;
end;
end;
'W':if p1.direc<>down then p1.direc:=up;
'S':if p1.direc<>up then p1.direc:=down;
'A':if p1.direc<>right then p1.direc:=left;
'D':if p1.direc<>left then p1.direc:=right;
#27:halt;
end;
end;
next;
delay(speed);
end;
end.
在http://www.quanpc.com/33813/EJB.aspx看到的
flickr的图片如果看不到,最简单的解决方法如下
目录:C:\Windows\System32\drivers\etc
打开hosts文件,在最后加上以下两行76.13.18.78 farm3.static.flickr.com
76.13.18.79 farm5.static.flickr.com
flickr的图片总是只能看到一些, 该了hosts快多了