第一,请你以后写正确的题目.
第二,无论是dos还是windows,在单cpu的电脑里,每个时刻,它们都只能执行一条指令.因此你的问题不是系统的问题,而是你算法的问题.
我提供一个思路:
game()
{
get_a_key();//if no key ,continue;
if(check_key_can_action())action();//if a key pressed,'left' for example, check it can move left or not.
if(can_down())down();//at last it will go down.check if it can go down.
else other();//if can't go down. which means it has already on the bottom.
}
第二,无论是dos还是windows,在单cpu的电脑里,每个时刻,它们都只能执行一条指令.因此你的问题不是系统的问题,而是你算法的问题.
我提供一个思路:
game()
{
get_a_key();//if no key ,continue;
if(check_key_can_action())action();//if a key pressed,'left' for example, check it can move left or not.
if(can_down())down();//at last it will go down.check if it can go down.
else other();//if can't go down. which means it has already on the bottom.
}