Skip to content

Instantly share code, notes, and snippets.

@denispeyrusaubes
Last active August 22, 2016 11:31
Show Gist options
  • Save denispeyrusaubes/dd06efb8abf7f0ec704e to your computer and use it in GitHub Desktop.
Save denispeyrusaubes/dd06efb8abf7f0ec704e to your computer and use it in GitHub Desktop.
//
// Constant.h
// Chess
//
// Created by Denis Peyrusaubes on 20/09/2015.
// Copyright © 2015 Retengr. All rights reserved.
//
#ifndef Constant_h
#define Constant_h
typedef NS_ENUM(NSInteger, ChessColor) {
ChessColorWhite,
ChessColorBlack
};
typedef NS_ENUM(NSInteger, ChessPiece) {
ChessPieceKing,
ChessPieceQueen,
ChessPieceKnight,
ChessPiecePawn,
ChessPieceRook,
ChessPieceBishop
};
#endif /* Constant_h */
@denispeyrusaubes
Copy link
Author

denispeyrusaubes commented Aug 22, 2016

//
//  ChessColor.swift
//  ChessGame
//
//  Created by Denis Peyrusaubes on 13/01/2016.
//  Copyright © 2016 Retengr. All rights reserved.
//

import Cocoa

enum ChessColor:String {
    case White = "White"
    case Black = "Black"
}

@denispeyrusaubes
Copy link
Author

denispeyrusaubes commented Aug 22, 2016

import Cocoa

enum ChessPiece:String {
    case king="K";
    case queen = "Q"
    case pawn = "P"
    case bishop = "B"
    case knight = "N"
    case rook = "R"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment