Changeset 220 for trunk/UGame.pas
- Timestamp:
- Jun 10, 2018, 12:18:28 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r219 r220 207 207 CellLinks: TCellLinks; 208 208 Areas: TMapAreas; 209 Cyclic: Boolean; 209 210 function IsOutsideShape(Coord: TPoint): Boolean; virtual; 210 211 function IsCellsNeighbor(Cell1, Cell2: TCell): Boolean; virtual; … … 946 947 else Pen.Width := 1; 947 948 Angle := ArcTan((PosTo.Y - PosFrom.Y) / (PosTo.X - PosFrom.X)); 949 if (Angle > +Pi) or (Angle < -Pi) then 950 raise Exception.Create('Wrong arrow angle ' + FloatToStr(Angle)); 951 948 952 if Sign(PosTo.X - PosFrom.X) = -1 then Angle := Angle + Pi; 949 953 ArrowCenter := View.CellToCanvasPos(TPoint.Create(Trunc(PosFrom.X + (PosTo.X - PosFrom.X) / 2), … … 3246 3250 for I := 0 to Cells.Count - 1 do begin 3247 3251 if I = 0 then Player := Cells[I].Player; 3248 if not Assigned(Cells[I].Player) or (Cells[I].Player <> Player) then begin 3252 if not Assigned(Cells[I].Player) then begin 3253 R := False; 3254 Break; 3255 end; 3256 if (Cells[I].Player <> Player) then begin 3249 3257 R := False; 3250 3258 Break;
Note:
See TracChangeset
for help on using the changeset viewer.