Changeset 70 for trunk/UGame.pas
- Timestamp:
- Feb 3, 2020, 1:24:08 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r69 r70 95 95 end; 96 96 97 TTileSkin = (tsLinear, tsPowerOfTwo, tsAlpha, tsRoman );97 TTileSkin = (tsLinear, tsPowerOfTwo, tsAlpha, tsRoman, tsBinary); 98 98 99 99 { TGame } … … 185 185 SSkinPowerOfTwo = 'Power of two'; 186 186 SSkinAlpha = 'Alpha'; 187 SSkinRoman = 'Roman numerals'; 187 SSkinRoman = 'Roman'; 188 SSkinBinary = 'Binary'; 188 189 STileShouldBeEmpty = 'Tile should be empty'; 189 190 … … 203 204 SkinText[tsAlpha] := SSkinAlpha; 204 205 SkinText[tsRoman] := SSkinRoman; 206 SkinText[tsBinary] := SSkinBinary; 205 207 end; 206 208 … … 1070 1072 end; 1071 1073 1074 function IntToBin(Num: Integer): string; 1075 begin 1076 Result := ''; 1077 while Num > 0 do begin 1078 Result := IntToStr(Num mod 2) + Result; 1079 Num := Num shr 1; 1080 end; 1081 end; 1082 1072 1083 function TGame.GetTileSkinValue(Value: Integer): string; 1073 1084 begin … … 1077 1088 tsAlpha: Result := Chr(Ord('A') + Value - 1); 1078 1089 tsRoman: Result := IntToStrRoman(Value); 1090 tsBinary: Result := IntToBin(Value); 1079 1091 else Result := IntToStr(Value); 1080 1092 end;
Note:
See TracChangeset
for help on using the changeset viewer.