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/python3 | |
# Simple TicTacToe game in Python - EAO | |
import random | |
import sys | |
board=[i for i in range(0,9)] | |
player, computer = '','' | |
# Corners, Center and Others, respectively | |
moves=((1,7,3,9),(5,),(2,4,6,8)) |
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
<-- Commands below connects the mininet hosts to internet and also with other mininet hosts.--> | |
$ sudo mn --topo=single,2 (topology of consisting 1 switch and 2 hosts) | |
$ sudo ifconfig s1 up | |
$ sudo ovs-vsctl add-port s1 enp0s3(or your NAT interface of virtual machine) | |
$ ifconfig enp0s3 0 | |
$ dhclient s1 (To get the IP address for s1. Till here VM will get the internet connectivity through OVS.) | |
mininet> xterm h1 | |
h1> ifconfig h1-eth0 0 |