const koorX=60;
      koorY=40;
      typc=4;
      maxplayers=4;
      bldlvlmax=3;
      marmy=5;

type
     recon=record
              name:packed array[1..20]of char;
              typo:byte;
              kolvo:byte;
              force:byte;
           end;
     otr=record
            enable:boolean;
            recons:array[1..12]of recon;
         end;
     tomaxplay=1..maxplayers;
     typi=1..typc;
     buildlevel=0..bldlvlmax;
     smt=record
           free:boolean;
           owner:tomaxplay;
           typ:typi;
           {empty,tree,town,army}
           armynomber:byte;
           buil:array[1..6] of buildlevel;
           {'wall','farm','market','armory','archery','craftman'}
         end;
    fileofmap=file of map;
var
    map:array [1..KOORX,1..koorY] of smt;
    army:array [1..maxplayers,1..marmy] of otr;
    players:byte;{kolvo igrokov}
    turn:integer;{nomer xoda}
    money:array[1..8]of integer;{dengi igrokov}
    doxod:array[1..8]of integer;{doxodi igrokov}
    {password:array[1..8]of string;}
    f:fileofmap;


procedure turnbegin;
 begin;
 end;


procedure addarmy;
 begin;
 end;

{------------------------------VIVOD MAP}

procedure vivodMAP;
 var i,j:integer;
 begin
 for i:=1 to koorY do
  begin
  for j:=1 to koorX do
   case map[j,i].typ of
    1:write(' ');
    2:write('^');
    3:write('0');
    4:write('W');
    end;
  writeln;
  end;
 end;

{--------------------------------NEW GAME}

procedure newgame;
var i,j:integer;
 begin
 writeln('Players?');
 readln(players);
 writeln('Starting money?');
 readln(money[1]);
 for i:=1 to players do
  money[i]:=money[1];
 {writeln('Choose a map.');}
 end;

{--------------------------------MAP EDITOR}

procedure mapeditor;
var i,j:integer;
 begin
 for i:=1 to koorx do
  begin
  for j:=1 to koory do
   read(map[i,j].typ);
  writeln;
  end;
 end;

{-----------------------------GAME}

begin
  writeln('               Welcome to "Total War Multiplayer v0.1!"');
  witeln;
  writeln('This version was made by: Tirvy');
  Writeln;
  writeln;
  writeln('   So, what would you like?');
  writeln(' 1:Map editor [testing now]');
  writeln(' 2:New game [testing now]');
  writeln(' 3:Load game [unsupported now]');
end.


