I cheated at spider solitair :D

I was kind of bored, not because I didn’t have work to do, but because I got sick of it, so I was playing spider solitair and at one point I told myself: why in the world am I wasting time trying to score high? Lets score low. Lowest possible is 100 points.
so, I started clicking and clicking to get my score down to 0 when I had only one card left to finish. Of course, you know that with one movement of one card you loose one point. So I had to get my score down from almost 1000 to 0. That is 1000 clicks. So I started clicking and clicking and eventually I got it down to over 73.000. clicks…
or not. Well, that’s where I cheated, I got tired of clicking and draging after about 200 such operations 😀 so I told myself, hey, I could write a program to do this for me. So I did:

[code:1:d3dc444c84]
function x(i:integer):integer;
begin
result:=round(i*65535/1279);
end;

function y(i:integer):integer;
begin
result:=round(i*65535/1023);
end;

procedure TForm1.FormCreate(Sender: TObject);
var i:integer;
begin
{ make sure that:
– the spider solitair window is in the upper left corner
– the screen resolution is 1280×1024
– there is only one card in the first slot
– ther eis no card in the second slot
– there is about 2 mm gap between slots
}
for i:=1 to 8000 do// change this accordingly
begin
mouse_event(MOUSEEVENTF_ABSOLUTE OR MOUSEEVENTF_MOVE, x(43), y(110), 0, 0);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_ABSOLUTE OR MOUSEEVENTF_MOVE, x(120), y(110), 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
sleep(1);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_ABSOLUTE OR MOUSEEVENTF_MOVE, x(43), y(110), 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
sleep(1);
end;
end;
[/code:1:d3dc444c84]

And after I got it down to 0, I told myself, lets see if spider programmers used a word for the movements, as any optimization freak would do (who in his sane mind would not be able to finish a spider solitair match in 65535 moves? ) So I fired it up and … it went over. Guess the programmer was a lazy one and used an int. I just didn’t have the nerves to watch the screen until it overflowed an int, so I didn’t try that 😛
But you’re welcome to try 🙂spider solitair cheatspider solitair cheatspider solitair cheatspider solitair cheat

Related posts

Leave a Reply

This blog is kept spam free by WP-SpamFree.