fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Sandbox.Map
  8. {
  9. public class GameMap
  10. {
  11. public int length;
  12. public int width;
  13. public int[,] map;
  14. public GameMap(int length, int width)
  15. {
  16. this.length = length;
  17. this.width = width;
  18. map = new int[width, length];
  19. }
  20. public void setMap()
  21. {
  22. for (int i = 0; i < width; i++)
  23. {
  24. for (int j = 0; j < length; j++)
  25. {
  26. if ((i == 0) || (i == width - 1) || (j == 0))
  27. {
  28. map[i, j] = 1; // Стены 'строим'
  29. }
  30. else
  31. {
  32. map[i, j] = 0; // Строим 'пол'
  33. }
  34. }
  35. }
  36. }
  37. }
  38. }
  39.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
error CS5001: Program `prog.exe' does not contain a static `Main' method suitable for an entry point
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty