Code Monkey home page Code Monkey logo

mine-sweeping's Introduction

扫雷游戏

在线试玩

使用 vue-next 实现的扫雷游戏

操作说明

左键 = 点开方块

右键 = 标记方块

左右键点击数字 = 显示附近未标记的方块 (旗帜标记和数字一致时,会自动打开附近未标记的方块)

在笔记本没有左右键的情况下,可使用如下按键等同于左右键:

  • mac 使用 command + 左键
  • win 使用 ctrl + 左键

游戏规则

游戏开始时,玩家可看到空白方块排成的矩形,方块数可由玩家自行选择。如果是第一次点开方块则不会踩到地雷。如果玩家点开没有地雷的方块,会有一个数字显现其上,这个数字代表着邻近方块有多少颗地雷(数字至多为8),玩家须运用逻辑来推断哪些方块含或不含地雷。

玩家可在推测有地雷的方块上点鼠标右键,以放置旗帜来标明地雷的位置;若再次点击右键,旗帜会变成问号,代表不确定是否有地雷存在;第三次点击右键后会使问号消失,成为空白的方块。若在已标明旗帜的方块点击左键,方块不会有任何的变动,若是点击标明问号的方块,则与点击空白的方块相同。若在游戏进行中错置旗帜或问号,可用右键来改变方块状态。

在某些版本,在一数字上同时点击左键及右键可显示邻近尚未标示的方块,这时如果已标示旗帜的数目与数字相同,那么未开的方块就会自动打开。然而,玩家若错置旗帜位置,此动作可能会打开真正藏有地雷的方块,导致游戏失败。不过这样的点击动作可加快游戏速度以便得到高分。

游戏难度

Windows版本有以下几种等级:

  • 初级:8 × 8,10颗地雷(Windows 98或以前)或9 × 9,10颗地雷(Windows 2000 或以后)
  • 中级:16 × 16,40颗地雷
  • 高级:30 × 16,99颗地雷
  • 自定义:最小可从8 × 8到最大宽度30 ×高度 24,10至668颗地雷(地雷数最多为(长 − 1) × (宽 − 1) )

mine-sweeping's People

Contributors

zhijiang3 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.