This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Carlos Amedee <carlos.amedee@gmail.com> | |
* | |
* @brief | |
* | |
* | |
*/ | |
#include <iostream> | |
#include <algorithm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- mode: python; tab-width: 4 -*- | |
# -*- coding: utf-8 -*- | |
# | |
import random | |
for x in range(100): | |
giants = [] | |
while len(giants) < 10: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Calculator { | |
int calculate(int valueA, int valueB); | |
} | |
public class Subtract implements Calculator { | |
public int calculate(int valueA, int valueB) { | |
return valueA - valueB; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Tic Tac Toe game implementation written in Ruby. | |
# The minmax algorithm is used to provide the AI. | |
class State | |
def initialize | |
@board = [[0,0,0],[0,0,0],[0,0,0]] | |
end | |
def is_empty(row, column) | |
if (@board[row][column] == 0) |
NewerOlder