terminull-arcade 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-EQAKR7UF.js +5871 -0
- package/dist/chunk-EQAKR7UF.js.map +1 -0
- package/dist/cli.js +47 -17
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +478 -7
- package/dist/index.js +1721 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-WCZVPTEK.js +0 -3294
- package/dist/chunk-WCZVPTEK.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
type GameId = 'packet-man' | 'cyber-viper' | '
|
|
3
|
+
type GameId = 'packet-man' | 'cyber-viper' | 'void-invaders' | 'hash-matrix' | 'cyber-dino' | 'level-devil' | 'cyber-breakout' | 'cyber-2048' | 'cyber-tower';
|
|
4
4
|
type DifficultyLevel = 'easy' | 'normal' | 'hard' | 'insane';
|
|
5
|
-
type GameCategory = '
|
|
5
|
+
type GameCategory = 'arcade' | 'puzzle' | 'strategy' | 'action';
|
|
6
6
|
type ThemeName = 'default' | 'retro-green' | 'neon' | 'minimal' | 'high-contrast';
|
|
7
7
|
interface KeyBinding {
|
|
8
8
|
key: string;
|
|
@@ -89,7 +89,7 @@ type UserProfile = z.infer<typeof UserProfileSchema>;
|
|
|
89
89
|
|
|
90
90
|
declare const APP_NAME = "TERMINULL";
|
|
91
91
|
declare const APP_TAGLINE = "Enter the Terminull. Play beyond the prompt.";
|
|
92
|
-
declare const APP_VERSION = "1.0.
|
|
92
|
+
declare const APP_VERSION = "1.0.2";
|
|
93
93
|
declare const MIN_TERMINAL_COLUMNS = 80;
|
|
94
94
|
declare const MIN_TERMINAL_ROWS = 24;
|
|
95
95
|
declare const ALL_GAMES_METADATA: Record<string, GameMetadata>;
|
|
@@ -104,7 +104,10 @@ declare function checkTerminalDimensions(): {
|
|
|
104
104
|
declare function playTerminalBell(enabled?: boolean): void;
|
|
105
105
|
declare function formatTime(seconds: number): string;
|
|
106
106
|
declare function clamp(val: number, min: number, max: number): number;
|
|
107
|
-
declare function
|
|
107
|
+
declare function stripAnsi(str: string): string;
|
|
108
|
+
declare function visibleLength(str: string): number;
|
|
109
|
+
declare function padRightVisible(str: string, targetWidth: number): string;
|
|
110
|
+
declare function wordWrap(text: string, maxWidth: number): string[];
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
113
|
* Deterministic Pseudo-Random Number Generator using Mulberry32.
|
|
@@ -239,8 +242,12 @@ declare class TerminalRenderer {
|
|
|
239
242
|
};
|
|
240
243
|
renderSizeWarning(): string;
|
|
241
244
|
createBox(lines: string[], width?: number, title?: string): string;
|
|
242
|
-
renderHeader(options: RenderHeaderOptions): string;
|
|
243
|
-
renderFooter(instructions: string): string;
|
|
245
|
+
renderHeader(options: RenderHeaderOptions, customWidth?: number): string;
|
|
246
|
+
renderFooter(instructions: string, customWidth?: number): string;
|
|
247
|
+
/**
|
|
248
|
+
* Centers a multi-line text block both horizontally and vertically within the terminal window.
|
|
249
|
+
*/
|
|
250
|
+
centerBlock(content: string, blockWidth?: number): string;
|
|
244
251
|
}
|
|
245
252
|
declare const defaultRenderer: TerminalRenderer;
|
|
246
253
|
|
|
@@ -294,6 +301,7 @@ interface MenuSelection {
|
|
|
294
301
|
gameId?: GameId;
|
|
295
302
|
difficulty?: DifficultyLevel;
|
|
296
303
|
}
|
|
304
|
+
declare function playArcadeLoadingScreen(game: GameMetadata, renderer?: TerminalRenderer, storage?: StorageManager): Promise<void>;
|
|
297
305
|
declare class ArcadeMenu {
|
|
298
306
|
private storage;
|
|
299
307
|
private achievements;
|
|
@@ -305,12 +313,19 @@ declare class ArcadeMenu {
|
|
|
305
313
|
private currentTab;
|
|
306
314
|
private selectedDifficulty;
|
|
307
315
|
private onSelectCallback;
|
|
316
|
+
private animTimer;
|
|
317
|
+
private animFrame;
|
|
318
|
+
private updateInfo;
|
|
308
319
|
constructor(storage?: StorageManager, achievements?: AchievementManager, renderer?: TerminalRenderer);
|
|
309
320
|
open(onSelect: (selection: MenuSelection) => void): void;
|
|
310
321
|
close(): void;
|
|
322
|
+
private ringBell;
|
|
311
323
|
private getFilteredGames;
|
|
324
|
+
private triggerLaunch;
|
|
312
325
|
private handleInput;
|
|
313
326
|
render(): void;
|
|
327
|
+
private renderFunkyBanner;
|
|
328
|
+
private renderDifficultyBadge;
|
|
314
329
|
private renderArcadeTab;
|
|
315
330
|
private renderStatsTab;
|
|
316
331
|
private renderSettingsTab;
|
|
@@ -531,5 +546,461 @@ declare class CyberViperGame implements GameModule {
|
|
|
531
546
|
getState(): CyberViperState;
|
|
532
547
|
}
|
|
533
548
|
|
|
534
|
-
|
|
549
|
+
type InvaderType = 'scout' | 'fighter' | 'bomber' | 'mothership';
|
|
550
|
+
interface ActiveInvader {
|
|
551
|
+
id: number;
|
|
552
|
+
type: InvaderType;
|
|
553
|
+
x: number;
|
|
554
|
+
y: number;
|
|
555
|
+
glyph: string;
|
|
556
|
+
points: number;
|
|
557
|
+
alive: boolean;
|
|
558
|
+
}
|
|
559
|
+
interface Bullet {
|
|
560
|
+
x: number;
|
|
561
|
+
y: number;
|
|
562
|
+
}
|
|
563
|
+
interface VoidInvadersState {
|
|
564
|
+
playerX: number;
|
|
565
|
+
playerY: number;
|
|
566
|
+
lives: number;
|
|
567
|
+
score: number;
|
|
568
|
+
invadersDestroyed: number;
|
|
569
|
+
wave: number;
|
|
570
|
+
descentSpeedTicks: number;
|
|
571
|
+
descentTickCounter: number;
|
|
572
|
+
currentInvader: ActiveInvader | null;
|
|
573
|
+
bullets: Bullet[];
|
|
574
|
+
isGameOver: boolean;
|
|
575
|
+
isWon: boolean;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
declare class VoidInvadersGame implements GameModule {
|
|
579
|
+
readonly id = "void-invaders";
|
|
580
|
+
readonly metadata: GameMetadata;
|
|
581
|
+
private config;
|
|
582
|
+
private renderer;
|
|
583
|
+
private input;
|
|
584
|
+
private rng;
|
|
585
|
+
private gameLoopTimer;
|
|
586
|
+
private invaderIdCounter;
|
|
587
|
+
private baseSpeedTicks;
|
|
588
|
+
private state;
|
|
589
|
+
private isPaused;
|
|
590
|
+
private pauseMenuIndex;
|
|
591
|
+
private showTutorial;
|
|
592
|
+
private tickIntervalMs;
|
|
593
|
+
init(config: GameInitConfig): void;
|
|
594
|
+
start(): void;
|
|
595
|
+
pause(): void;
|
|
596
|
+
resume(): void;
|
|
597
|
+
restart(): void;
|
|
598
|
+
saveState(): Record<string, unknown>;
|
|
599
|
+
loadState(saved: Record<string, unknown>): void;
|
|
600
|
+
destroy(): void;
|
|
601
|
+
private resetGame;
|
|
602
|
+
private spawnNextInvader;
|
|
603
|
+
private scheduleNextTick;
|
|
604
|
+
tick(): void;
|
|
605
|
+
private updateBullets;
|
|
606
|
+
private advanceInvaderDescent;
|
|
607
|
+
private checkCollisions;
|
|
608
|
+
private handleInput;
|
|
609
|
+
render(): void;
|
|
610
|
+
getState(): VoidInvadersState;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
declare class HashMatrixGame implements GameModule {
|
|
614
|
+
readonly id = "hash-matrix";
|
|
615
|
+
readonly metadata: GameMetadata;
|
|
616
|
+
private config;
|
|
617
|
+
private renderer;
|
|
618
|
+
private input;
|
|
619
|
+
private rng;
|
|
620
|
+
private loopTimer;
|
|
621
|
+
private resizeHandler;
|
|
622
|
+
private rainDrops;
|
|
623
|
+
private memoryAddress;
|
|
624
|
+
private state;
|
|
625
|
+
private getDimensions;
|
|
626
|
+
init(config: GameInitConfig): void;
|
|
627
|
+
private initRain;
|
|
628
|
+
start(): void;
|
|
629
|
+
pause(): void;
|
|
630
|
+
resume(): void;
|
|
631
|
+
restart(): void;
|
|
632
|
+
saveState(): Record<string, unknown>;
|
|
633
|
+
loadState(saved: Record<string, unknown>): void;
|
|
634
|
+
destroy(): void;
|
|
635
|
+
private stopAndExit;
|
|
636
|
+
private handleInput;
|
|
637
|
+
private scheduleTick;
|
|
638
|
+
private tick;
|
|
639
|
+
private colorize;
|
|
640
|
+
private generateRandomHash;
|
|
641
|
+
private renderHashCascade;
|
|
642
|
+
private renderHexDump;
|
|
643
|
+
private renderMatrixRain;
|
|
644
|
+
private renderCipherBreach;
|
|
645
|
+
render(): void;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
type ObstacleType = 'cactus-small' | 'cactus-double' | 'cactus-triple' | 'pterodactyl-low' | 'pterodactyl-mid' | 'pterodactyl-high';
|
|
649
|
+
interface Obstacle {
|
|
650
|
+
id: number;
|
|
651
|
+
x: number;
|
|
652
|
+
y: number;
|
|
653
|
+
width: number;
|
|
654
|
+
height: number;
|
|
655
|
+
type: ObstacleType;
|
|
656
|
+
wingFrame?: number;
|
|
657
|
+
}
|
|
658
|
+
interface CyberDinoState {
|
|
659
|
+
dinoY: number;
|
|
660
|
+
dinoVelocityY: number;
|
|
661
|
+
isGrounded: boolean;
|
|
662
|
+
isDucking: boolean;
|
|
663
|
+
duckTicksRemaining: number;
|
|
664
|
+
runFrame: number;
|
|
665
|
+
score: number;
|
|
666
|
+
highScore: number;
|
|
667
|
+
speed: number;
|
|
668
|
+
isNightMode: boolean;
|
|
669
|
+
nightModeCountdown: number;
|
|
670
|
+
obstacles: Obstacle[];
|
|
671
|
+
groundOffset: number;
|
|
672
|
+
cactiCleared: number;
|
|
673
|
+
pterodactylsDucked: number;
|
|
674
|
+
isGameOver: boolean;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
declare class CyberDinoGame implements GameModule {
|
|
678
|
+
readonly id = "cyber-dino";
|
|
679
|
+
readonly metadata: GameMetadata;
|
|
680
|
+
private config;
|
|
681
|
+
private renderer;
|
|
682
|
+
private input;
|
|
683
|
+
private rng;
|
|
684
|
+
private gameLoopTimer;
|
|
685
|
+
private obstacleIdCounter;
|
|
686
|
+
private tickIntervalMs;
|
|
687
|
+
private state;
|
|
688
|
+
private isPaused;
|
|
689
|
+
private pauseMenuIndex;
|
|
690
|
+
private showTutorial;
|
|
691
|
+
private ticksSinceLastObstacle;
|
|
692
|
+
init(config: GameInitConfig): void;
|
|
693
|
+
start(): void;
|
|
694
|
+
pause(): void;
|
|
695
|
+
resume(): void;
|
|
696
|
+
restart(): void;
|
|
697
|
+
saveState(): Record<string, unknown>;
|
|
698
|
+
loadState(saved: Record<string, unknown>): void;
|
|
699
|
+
handleInputForTest(key: {
|
|
700
|
+
name: string;
|
|
701
|
+
}): void;
|
|
702
|
+
destroy(): void;
|
|
703
|
+
private resetState;
|
|
704
|
+
private scheduleNextTick;
|
|
705
|
+
tick(): void;
|
|
706
|
+
private spawnObstacle;
|
|
707
|
+
private checkCollision;
|
|
708
|
+
private handleInput;
|
|
709
|
+
render(): void;
|
|
710
|
+
private writeSprite;
|
|
711
|
+
getState(): CyberDinoState;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
type TrapType = 'rising-spike' | 'falling-floor' | 'runaway-door' | 'ceiling-spike' | 'inverted-controls' | 'gravity-pad' | 'fake-pit';
|
|
715
|
+
interface Trap {
|
|
716
|
+
id: number;
|
|
717
|
+
type: TrapType;
|
|
718
|
+
triggerX: number;
|
|
719
|
+
triggered: boolean;
|
|
720
|
+
x: number;
|
|
721
|
+
y: number;
|
|
722
|
+
width?: number;
|
|
723
|
+
height?: number;
|
|
724
|
+
targetX?: number;
|
|
725
|
+
targetY?: number;
|
|
726
|
+
}
|
|
727
|
+
interface LevelDevilState {
|
|
728
|
+
currentLevel: number;
|
|
729
|
+
deaths: number;
|
|
730
|
+
levelDeaths: number;
|
|
731
|
+
playerX: number;
|
|
732
|
+
playerY: number;
|
|
733
|
+
playerVx: number;
|
|
734
|
+
playerVy: number;
|
|
735
|
+
isGrounded: boolean;
|
|
736
|
+
doorX: number;
|
|
737
|
+
doorY: number;
|
|
738
|
+
doorOpen: boolean;
|
|
739
|
+
gravityFlipped: boolean;
|
|
740
|
+
controlsInverted: boolean;
|
|
741
|
+
activeTraps: Trap[];
|
|
742
|
+
dynamicTiles: Record<string, string>;
|
|
743
|
+
isLevelComplete: boolean;
|
|
744
|
+
isGameWon: boolean;
|
|
745
|
+
isGameOver: boolean;
|
|
746
|
+
isDying: boolean;
|
|
747
|
+
deathTicks: number;
|
|
748
|
+
tauntText: string;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
declare class LevelDevilGame implements GameModule {
|
|
752
|
+
readonly id = "level-devil";
|
|
753
|
+
readonly metadata: GameMetadata;
|
|
754
|
+
private config;
|
|
755
|
+
private renderer;
|
|
756
|
+
private input;
|
|
757
|
+
private rng;
|
|
758
|
+
private gameLoopTimer;
|
|
759
|
+
private tickIntervalMs;
|
|
760
|
+
private state;
|
|
761
|
+
private isPaused;
|
|
762
|
+
private pauseMenuIndex;
|
|
763
|
+
private showTutorial;
|
|
764
|
+
init(config: GameInitConfig): void;
|
|
765
|
+
start(): void;
|
|
766
|
+
pause(): void;
|
|
767
|
+
resume(): void;
|
|
768
|
+
restart(): void;
|
|
769
|
+
saveState(): Record<string, unknown>;
|
|
770
|
+
loadState(saved: Record<string, unknown>): void;
|
|
771
|
+
getState(): Readonly<LevelDevilState>;
|
|
772
|
+
handleInputForTest(key: {
|
|
773
|
+
name: string;
|
|
774
|
+
}): void;
|
|
775
|
+
destroy(): void;
|
|
776
|
+
private loadLevel;
|
|
777
|
+
private triggerDeath;
|
|
778
|
+
private scheduleNextTick;
|
|
779
|
+
tick(): void;
|
|
780
|
+
private activateTrap;
|
|
781
|
+
private getTileAt;
|
|
782
|
+
private resolveCollisions;
|
|
783
|
+
private advanceLevel;
|
|
784
|
+
private handleInput;
|
|
785
|
+
render(): void;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
type BrickType = 'green' | 'cyan' | 'gold' | 'explosive' | 'capsule';
|
|
789
|
+
type CapsuleType = 'expand' | 'laser' | 'multiball' | 'slow' | 'life' | 'shield';
|
|
790
|
+
interface Brick {
|
|
791
|
+
id: number;
|
|
792
|
+
x: number;
|
|
793
|
+
y: number;
|
|
794
|
+
width: number;
|
|
795
|
+
type: BrickType;
|
|
796
|
+
hitsLeft: number;
|
|
797
|
+
maxHits: number;
|
|
798
|
+
capsule?: CapsuleType;
|
|
799
|
+
}
|
|
800
|
+
interface Ball {
|
|
801
|
+
id: number;
|
|
802
|
+
x: number;
|
|
803
|
+
y: number;
|
|
804
|
+
vx: number;
|
|
805
|
+
vy: number;
|
|
806
|
+
attachedToPaddle: boolean;
|
|
807
|
+
}
|
|
808
|
+
interface Capsule {
|
|
809
|
+
id: number;
|
|
810
|
+
x: number;
|
|
811
|
+
y: number;
|
|
812
|
+
type: CapsuleType;
|
|
813
|
+
}
|
|
814
|
+
interface Laser {
|
|
815
|
+
id: number;
|
|
816
|
+
x: number;
|
|
817
|
+
y: number;
|
|
818
|
+
}
|
|
819
|
+
interface CyberBreakoutState {
|
|
820
|
+
paddleX: number;
|
|
821
|
+
paddleWidth: number;
|
|
822
|
+
hasLaser: boolean;
|
|
823
|
+
hasShield: boolean;
|
|
824
|
+
laserTimer: number;
|
|
825
|
+
expandTimer: number;
|
|
826
|
+
balls: Ball[];
|
|
827
|
+
capsules: Capsule[];
|
|
828
|
+
lasers: Laser[];
|
|
829
|
+
bricks: Brick[];
|
|
830
|
+
score: number;
|
|
831
|
+
lives: number;
|
|
832
|
+
wave: number;
|
|
833
|
+
bricksDestroyed: number;
|
|
834
|
+
isGameOver: boolean;
|
|
835
|
+
isWon: boolean;
|
|
836
|
+
combo: number;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare class CyberBreakoutGame implements GameModule {
|
|
840
|
+
readonly id = "cyber-breakout";
|
|
841
|
+
readonly metadata: GameMetadata;
|
|
842
|
+
private config;
|
|
843
|
+
private renderer;
|
|
844
|
+
private input;
|
|
845
|
+
private rng;
|
|
846
|
+
private gameLoopTimer;
|
|
847
|
+
private tickIntervalMs;
|
|
848
|
+
private baseBallSpeed;
|
|
849
|
+
private state;
|
|
850
|
+
private isPaused;
|
|
851
|
+
private pauseMenuIndex;
|
|
852
|
+
private showTutorial;
|
|
853
|
+
private nextEntityId;
|
|
854
|
+
init(config: GameInitConfig): void;
|
|
855
|
+
start(): void;
|
|
856
|
+
pause(): void;
|
|
857
|
+
resume(): void;
|
|
858
|
+
restart(): void;
|
|
859
|
+
saveState(): Record<string, unknown>;
|
|
860
|
+
loadState(saved: Record<string, unknown>): void;
|
|
861
|
+
getState(): Readonly<CyberBreakoutState>;
|
|
862
|
+
handleInputForTest(key: {
|
|
863
|
+
name: string;
|
|
864
|
+
}): void;
|
|
865
|
+
destroy(): void;
|
|
866
|
+
private applyDifficulty;
|
|
867
|
+
private resetGame;
|
|
868
|
+
private loadWave;
|
|
869
|
+
private generateBricksForWave;
|
|
870
|
+
private launchBall;
|
|
871
|
+
private fireLasers;
|
|
872
|
+
private scheduleNextTick;
|
|
873
|
+
tick(): void;
|
|
874
|
+
private checkBallBrickCollisions;
|
|
875
|
+
private hitBrick;
|
|
876
|
+
private triggerExplosion;
|
|
877
|
+
private applyCapsule;
|
|
878
|
+
private handleLifeLost;
|
|
879
|
+
private handleWaveCleared;
|
|
880
|
+
private addScore;
|
|
881
|
+
private handleInput;
|
|
882
|
+
render(): void;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
type GridDirection = 'up' | 'down' | 'left' | 'right';
|
|
886
|
+
interface Cyber2048State {
|
|
887
|
+
grid: number[][];
|
|
888
|
+
score: number;
|
|
889
|
+
bestScore: number;
|
|
890
|
+
moves: number;
|
|
891
|
+
undosLeft: number;
|
|
892
|
+
highestTile: number;
|
|
893
|
+
hasWon: boolean;
|
|
894
|
+
continueAfterWin: boolean;
|
|
895
|
+
isGameOver: boolean;
|
|
896
|
+
lastMergedValue: number;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
declare class Cyber2048Game implements GameModule {
|
|
900
|
+
readonly id = "cyber-2048";
|
|
901
|
+
readonly metadata: GameMetadata;
|
|
902
|
+
private config;
|
|
903
|
+
private renderer;
|
|
904
|
+
private input;
|
|
905
|
+
private rng;
|
|
906
|
+
private state;
|
|
907
|
+
private history;
|
|
908
|
+
private isPaused;
|
|
909
|
+
private pauseMenuIndex;
|
|
910
|
+
private showTutorial;
|
|
911
|
+
private burstCells;
|
|
912
|
+
private burstTimer;
|
|
913
|
+
init(config: GameInitConfig): void;
|
|
914
|
+
start(): void;
|
|
915
|
+
pause(): void;
|
|
916
|
+
resume(): void;
|
|
917
|
+
restart(): void;
|
|
918
|
+
saveState(): Record<string, unknown>;
|
|
919
|
+
loadState(saved: Record<string, unknown>): void;
|
|
920
|
+
getState(): Readonly<Cyber2048State>;
|
|
921
|
+
handleInputForTest(key: {
|
|
922
|
+
name: string;
|
|
923
|
+
}): void;
|
|
924
|
+
destroy(): void;
|
|
925
|
+
private applyDifficulty;
|
|
926
|
+
private resetGame;
|
|
927
|
+
private spawnTile;
|
|
928
|
+
private slideLine;
|
|
929
|
+
slide(dir: GridDirection): boolean;
|
|
930
|
+
undo(): boolean;
|
|
931
|
+
private checkGameOver;
|
|
932
|
+
private handleInput;
|
|
933
|
+
private renderCellLine;
|
|
934
|
+
private getTileLayer;
|
|
935
|
+
render(): void;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
interface TowerFloor {
|
|
939
|
+
x: number;
|
|
940
|
+
width: number;
|
|
941
|
+
floorNumber: number;
|
|
942
|
+
colorIndex: number;
|
|
943
|
+
}
|
|
944
|
+
interface FallingDebris {
|
|
945
|
+
id: number;
|
|
946
|
+
x: number;
|
|
947
|
+
y: number;
|
|
948
|
+
width: number;
|
|
949
|
+
colorIndex: number;
|
|
950
|
+
}
|
|
951
|
+
interface CyberTowerState {
|
|
952
|
+
currentX: number;
|
|
953
|
+
currentVx: number;
|
|
954
|
+
currentWidth: number;
|
|
955
|
+
floors: TowerFloor[];
|
|
956
|
+
fallingDebris: FallingDebris[];
|
|
957
|
+
floorsStacked: number;
|
|
958
|
+
score: number;
|
|
959
|
+
bestScore: number;
|
|
960
|
+
perfectStreak: number;
|
|
961
|
+
maxStreak: number;
|
|
962
|
+
isPerfect: boolean;
|
|
963
|
+
perfectFlashTicks: number;
|
|
964
|
+
isGameOver: boolean;
|
|
965
|
+
altitude: number;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
declare class CyberTowerGame implements GameModule {
|
|
969
|
+
readonly id = "cyber-tower";
|
|
970
|
+
readonly metadata: GameMetadata;
|
|
971
|
+
private config;
|
|
972
|
+
private renderer;
|
|
973
|
+
private input;
|
|
974
|
+
private rng;
|
|
975
|
+
private gameLoopTimer;
|
|
976
|
+
private tickIntervalMs;
|
|
977
|
+
private baseSpeed;
|
|
978
|
+
private state;
|
|
979
|
+
private isPaused;
|
|
980
|
+
private pauseMenuIndex;
|
|
981
|
+
private showTutorial;
|
|
982
|
+
private nextDebrisId;
|
|
983
|
+
init(config: GameInitConfig): void;
|
|
984
|
+
start(): void;
|
|
985
|
+
pause(): void;
|
|
986
|
+
resume(): void;
|
|
987
|
+
restart(): void;
|
|
988
|
+
saveState(): Record<string, unknown>;
|
|
989
|
+
loadState(saved: Record<string, unknown>): void;
|
|
990
|
+
getState(): Readonly<CyberTowerState>;
|
|
991
|
+
handleInputForTest(key: {
|
|
992
|
+
name: string;
|
|
993
|
+
}): void;
|
|
994
|
+
destroy(): void;
|
|
995
|
+
private applyDifficulty;
|
|
996
|
+
private resetGame;
|
|
997
|
+
private scheduleNextTick;
|
|
998
|
+
tick(): void;
|
|
999
|
+
dropFloor(): boolean;
|
|
1000
|
+
private addScore;
|
|
1001
|
+
private handleInput;
|
|
1002
|
+
render(): void;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
export { ALL_GAMES_METADATA, APP_NAME, APP_TAGLINE, APP_VERSION, AchievementManager, ArcadeMenu, ByteRunnerGame, Cyber2048Game, CyberBreakoutGame, CyberDinoGame, CyberTowerGame, CyberViperGame, DeterministicRNG, HashMatrixGame, LevelDevilGame, MIN_TERMINAL_COLUMNS, MIN_TERMINAL_ROWS, NeonCircuitGame, PacketManGame, StorageManager, THEMES, TerminalInputHandler, TerminalRenderer, TerminullEngine, UserProfileSchema, UserSettingsSchema, VoidInvadersGame, checkTerminalDimensions, clamp, defaultAchievements, defaultEngine, defaultRenderer, defaultStorage, formatTime, getTheme, padRightVisible, playArcadeLoadingScreen, playTerminalBell, stripAnsi, visibleLength, wordWrap };
|
|
535
1006
|
export type { Achievement, ColorPalette, DifficultyLevel, EngineEvents, GameCategory, GameId, GameInitConfig, GameMetadata, GameModule, KeyBinding, KeyPressHandler, MenuSelection, RenderHeaderOptions, ThemeName, UnlockedEvent, UserProfile, UserSettings };
|