summaryrefslogtreecommitdiff
path: root/src/Game/edit.cpp
blob: 8d9c37f8e0ce23fa3865493376657b1f947edcc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "Game.hpp"
#include "../Utils/Utils.hpp"

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <string>

int Game::editDiff(){
    Utils util;

    std::cout << "Now editing custom difficulty" << std::endl;

    std::cout << "Board width: ";
    if(util.catchReturn(util.catchInputInt(Game::boardWidth)) != 0) return 1;

    std::cout << "Board height: ";
    if(util.catchReturn(util.catchInputInt(Game::boardHeight)) != 0) return 1;

    std::cout << "Mines: ";
    if(util.catchReturn(util.catchInputInt(Game::mines)) != 0) return 1;

    return 0;
}