
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@mindmodel/game
Advanced tools
A collection of cognitive assessment games built with React, designed for easy integration into research applications.
A collection of cognitive assessment games built with React, designed for easy integration into research applications.
Create a modular, well-documented set of cognitive assessment games that can be:
# Install from npm
npm install @cognitive-games/core
# Or using yarn
yarn add @cognitive-games/core
import { DigitSpan, NBack, StroopTask } from '@cognitive-games/core';
function App() {
const handleGameComplete = (results) => {
console.log('Game Results:', results);
};
return (
<DigitSpan
onComplete={handleGameComplete}
config={{
trials: 10,
difficulty: 'medium'
}}
/>
);
}
Each game can be imported individually:
import { DigitSpan } from '@cognitive-games/core/games/digit-span';
import { NBack } from '@cognitive-games/core/games/n-back';
import { StroopTask } from '@cognitive-games/core/games/stroop';
import { CardSorting } from '@cognitive-games/core/games/card-sorting';
import { GoNoGo } from '@cognitive-games/core/games/go-no-go';
All games share these base props:
interface CommonGameProps {
onComplete: (results: GameResults) => void; // Required
config?: Partial<GameConfig>; // Optional
theme?: ThemeConfig; // Optional
onError?: (error: Error) => void; // Optional
language?: string; // Optional, defaults to 'en'
}
cognitive-games/
├── src/
│ ├── components/ # Shared components
│ │ ├── countdown.tsx # Timer component
│ │ ├── endScreen.tsx # Game completion screen
│ │ ├── loading.tsx # Loading indicator
│ │ ├── startScreen.tsx # Game start screen
│ │ └
│ │
│ ├── games/ # Game implementations
│ │ ├── cardSorting/
│ │ │ ├── game.tsx # Main game component
│ │ │ ├── config.tsx # Game configuration
│ │ │ ├── styles.tsx # Game-specific styles
│ │ │ └── index.ts # Game exports
│ │ └── ... (other games)
│ │
│ ├── pages/ # Page components
│ │ └── TestDashboard.tsx # Game selection dashboard
│ │
│ │
│ └── App.tsx # Main application component
Each game follows a consistent structure with 5 required files:
game.tsximport React from 'react';
import { GameProps, GameState } from './types';
import { gameConfig } from './config';
export const Game: React.FC<GameProps> = ({ onComplete }) => {
// Core game logic
const [gameState, setGameState] = useState<GameState>({
isActive: false,
currentTrial: 0,
score: 0,
responses: []
});
// Required functions
const startGame = () => { /* ... */ };
const nextTrial = () => { /* ... */ };
const handleResponse = (response: any) => { /* ... */ };
const endGame = () => { /* ... */ };
const handleCountdownComplete = () => { /* ... */ };
return (
<div className="game-container">
{/* Game UI */}
</div>
);
};
types.tsexport interface GameProps {
onComplete: (results: GameResults) => void;
config?: Partial<GameConfig>;
}
export interface GameState {
isActive: boolean;
currentTrial: number;
score: number;
responses: GameResponse[];
}
export interface GameResults {
accuracy: number;
averageResponseTime: number;
totalTime: number;
responses: GameResponse[];
}
config.tsexport const gameConfig = {
trials: 20,
trialDuration: 3000,
interTrialInterval: 1000,
countdownDuration: 3,
minimumResponseTime: 200,
// Game-specific settings
};
styles.css.game-container {
display: flex;
flex-direction: column;
align-items: center;
padding: 2rem;
}
.game-stimulus {
font-size: 2rem;
margin: 2rem 0;
}
.game-controls {
display: flex;
gap: 1rem;
}
index.tsexport { Game } from './game';
export type { GameProps, GameResults } from './types';
export { gameConfig } from './config';
Each game must implement performance tracking:
interface GameMetrics {
accuracy: number; // Percentage of correct responses
responseTime: number; // Average response time in ms
totalTime: number; // Total game duration
trialHistory: Trial[]; // Complete trial data
}
src/games/TestDashboard.tsxApp.tsxFAQs
A collection of cognitive assessment games built with React, designed for easy integration into research applications.
We found that @mindmodel/game demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.