Guys and girl :-) I knew there must be a simple solution!!!!!

I finally figured it out :-)
[pascal]
procedure TFormGame.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if not ( Key in ['0'..'9',#8] ) then
begin
Key := #0;
MessageBeep (MB_ICONEXCLAMATION);
end
else inherited KeyPress(Key);

if (block.Image = formGame.DXImageList.Items.Find('Block2')) //single
or (block.Image = formGame.DXImageList.Items.Find('Block3')) //single
or (block.Image = formGame.DXImageList.Items.Find('Block6')) //single
or (block.Image = formGame.DXImageList.Items.Find('Block8'))// single
and (key in['0'..'9']) then
edit1.MaxLength := 1
else
edit1.MaxLength :=2
end;
[/pascal]
And in my RenderPlay:
[pascal]
if (edit1.Text = '21') and (block.Image = formGame.DXImageList.Items.Find('Block1')) then
begin
pause;
result := True;
player.Moved := true;
end;
if (edit1.Text = '6') and (block.Image = formGame.DXImageList.Items.Find('Block2')) then
begin
pause;
result := True;
player.Moved := true;
end;[/pascal]
Now I can be sure that the user is only able to enter single numbers where the answer must be a single number and for the rest double numbers.

:twisted: :twisted: :twisted: :twisted: :twisted: :twisted: :twisted: