Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Lucky SpinNew to Visual Studio Code? Get it now.
Lucky Spin

Lucky Spin

Lehifebo

|
20 installs
| (0) | Free
A webview extension for VS Code that lets you spin reels and track your balance.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lucky Spin

A lightweight VS Code extension that adds a reel spinner webview to the Explorer panel.

Players can spin the reels, track balance, and reset credits while keeping the UI inside a VS Code custom view.

Features

  • Webview-based slot machine UI inside the Explorer view
  • Current balance display and spin cost indicator
  • Adjustable bet from 1 to 20 credits per line; total spin cost scales with all eligible lines on the selected board
  • Animated reel behavior and result messages
  • Winning combinations across horizontal, vertical, and diagonal lines; payouts stack across winning lines
  • Three visual styles with distinct symbols: Classic Fruit, Gems, and Ocean
  • Minimize mode that displays the first three reels in the VS Code status bar
  • Click the status-bar emojis to spin while minimized without reopening the game view
  • Automatically minimizes when the Lucky Spin view is collapsed; the status-bar emojis animate during spins
  • Reset balance command to restore credits
  • Custom commands exposed in the Command Palette

Usage

  1. Open this extension folder in VS Code.
  2. Run npm install if dependencies are not already installed.
  3. Build the extension with:
npm run compile
  1. Press F5 to launch the extension in the Extension Development Host.
  2. Open the Code Spin view from the Explorer panel.
  3. Choose a board size, style, and bet per line (1–20 credits), then click Spin to play. Total cost is bet per line multiplied by the number of eligible lines, so larger boards cost more. Classic Fruit, Gems, and Ocean share the same payout values. Reset restores the balance to 100. Collapse the Lucky Spin view to minimize it to three symbols in the VS Code status bar. Click those symbols to spin; use Restore in the view to expand the game again.

Commands

  • codeSpin.spin — Trigger a reel spin from the Command Palette.
  • codeSpin.resetBalance — Reset the balance to 100.

Development

Use these scripts during development:

  • npm run compile — Compile TypeScript to JavaScript.
  • npm run watch — Run the TypeScript compiler in watch mode.
  • npm run lint — Run ESLint on the src folder.
  • npm test — Run the extension tests.

Project structure

  • src/extension.ts — Extension activation, webview provider, and message handling.
  • src/view.html.ts — Webview HTML builder and client-side slot logic.
  • src/view.css — External CSS used by the webview.
  • src/slotlogic.ts — Slot spin simulation and payout calculation.
  • src/test/extension.test.ts — Extension unit tests.

Notes

  • The extension contributes a custom Explorer webview named Code Spin.
  • The webview loads CSS via webview.asWebviewUri(...).
  • State persistence is handled with acquireVsCodeApi().setState(...).

License

This project is provided as-is. Update the license and contribution details as needed.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft