1. void updatewithpeople(){
    2. if(GetAsyncKeyState(0x41)&0x8000){
    3. Sleep(10);
    4. if(GetAsyncKeyState(0x41)&0x8000){
    5. if(cube_x>=0){
    6. cube_x-=40;
    7. switch(kind){
    8. case 0:
    9. view[cube_x+80][cube_y]=0;view[cube_x+80][cube_y+40]=0;
    10. break;
    11. case 1:
    12. view[cube_x+80][cube_y]=0;view[cube_x+80][cube_y+40]=0;
    13. break;
    14. case 2:
    15. view[cube_x+80][cube_y]=0;view[cube_x+120][cube_y+40]=0;
    16. break;
    17. case 3:
    18. view[cube_x+80][cube_y]=0;view[cube_x+40][cube_y+40]=0;
    19. break;
    20. case 4:
    21. view[cube_x+160][cube_y]=0;
    22. break;
    23. case 5:
    24. view[cube_x+40][cube_y]=0;view[cube_x+120][cube_y+40]=0;
    25. break;
    26. case 6:
    27. view[cube_x+40][cube_y]=0;view[cube_x+40][cube_y+40]=0;
    28. break;
    29. case 7:
    30. view[cube_x+40][cube_y]=0;view[cube_x+80][cube_y+40]=0;
    31. break;
    32. }
    33. }
    34. }
    35. while(GetAsyncKeyState(0x41)&0x8000);
    36. }
    37. if(GetAsyncKeyState(0x44)&0x8000){
    38. Sleep(10);
    39. if(GetAsyncKeyState(0x44)&0x8000){
    40. if(cube_x<=800)
    41. {
    42. cube_x+=40;
    43. switch(kind)
    44. {
    45. case 0:
    46. view[cube_x-40][cube_y]=0;view[cube_x-40][cube_y+40]=0;
    47. break;
    48. case 1:
    49. view[cube_x-40][cube_y]=0;view[cube_x-40][cube_y+40]=0;
    50. break;
    51. case 2:
    52. view[cube_x-40][cube_y]=0;view[cube_x][cube_y+40]=0;
    53. break;
    54. case 3:
    55. view[cube_x-40][cube_y]=0;view[cube_x-80][cube_y+40]=0;
    56. break;
    57. case 4:
    58. view[cube_x-40][cube_y]=0;
    59. break;
    60. case 5:
    61. view[cube_x-40][cube_y]=0;view[cube_x-40][cube_y+40]=0;
    62. break;
    63. case 6:
    64. view[cube_x-40][cube_y]=0;view[cube_x-120][cube_y+40]=0;
    65. break;
    66. case 7:
    67. view[cube_x-40][cube_y]=0;view[cube_x-80][cube_y+40]=0;
    68. break;
    69. }
    70. }
    71. }
    72. while(GetAsyncKeyState(0x44)&0x8000);
    73. }
    74. if(GetAsyncKeyState(VK_SPACE)&0x8000){
    75. Sleep(10);
    76. if(GetAsyncKeyState(VK_SPACE)&0x8000){
    77. switch(kind){
    78. case 0:
    79. break;
    80. case 1:
    81. break;
    82. case 2:
    83. break;
    84. case 3:
    85. break;
    86. case 4:
    87. break;
    88. case 5:
    89. break;
    90. case 6:
    91. break;
    92. case 7:
    93. break;
    94. }
    95. }
    96. while(GetAsyncKeyState(VK_SPACE)&0x8000);
    97. }
    98. }