►
From YouTube: NEAR Certified Demo | Episode 5.2 -- Tic Tac Toe
Description
This demonstration was presented by the author(s) after just 1 week of working with the NEAR platform as part of the NEAR Certified Developer program.
You can find the source code to this demo here:
https://github.com/Learn-NEAR/NCD-05--tic-tac-toe
---
Follow the latest from NEAR Protocol on:
Website: https://near.org/
Discord: https://near.chat/
Blog: https://near.org/blog/
Twitter: https://twitter.com/NEARProtocol
GitHub: https://github.com/near https://github.com/nearprotocol
#Blockchain #FutureIsNEAR #NEAR #nearprotocol
A
C
B
C
B
B
C
C
So
can
you
guys
see
the
video
here.
B
C
Okay,
so
let's
begin
the
first
point
here
is
that
igor
is
deploying
the
the
smart
contract
and
now
he
will
create
a
game.
So
he
called
the
function,
create
game,
passing
his
account
id
and
and
attach
some
near
tokens.
So
the
basic
idea
is
that
you
have
the
the
the
player
one
who
created
the
game
and
he
needs
to
attach
some
near
tokens
and
then
he
got
an
id
here.
C
He'll
get
he'll
copy
his
id
and
send
to
me,
for
example,
and
me
in
the
other
and
I'm
gonna
get
that
that
id
and
join
the
game.
So
we
have
another
function,
called
join
game
that
I
passed
the
game
id
and
I
need
to
attach
some
new
tokens
to
to
start
playing
playing
the
game.
C
So
it
works
a
little
bit
fast.
But
here
we
go,
it
says,
join
at
the
game,
let's
play
so
we
have.
The
two
players
already
joined
the
games.
So
the
next
part
of
the
the
video
is
to
start
choosing
a
row
and
a
column
to
to
to
to
to
play
the
game.
C
One
is
the
is
the
number
we
we
just
don't
use
it
the
x
and
o
or
circle.
We
use
one
and
minus
one.
For
this
example,
we
recorded
yesterday-
and
we
made
some
improvement
improvements
since
then,
but
the
main
idea
is
the
player
one
is,
is,
he
is
the
number
one
and
the
player
two
is
the
minus
one.
C
So
here
he
goes
or
the
the
other
function.
We
created
its
viewport
that
it
shows
the
the
tic-tac-toe
game
so
the
first
row,
the
second
row
and
the
third
row,
and
no
one
feel
it
nothing,
but
because
we
we
didn't
play
any
any
rounds
yet.
C
Color
play
function
here,
let's
see
yes,
so
igor
call
it
the
play,
function,
passing
the
id
the
the
row
or
line
and
the
column,
and
now
we
can
see
that
that
that
that
one
and
the
position
he
he
sent
was
was
fielded
here
in
the
game
and
now
it's
my
turn
playing
choosing
another
row
and
another
column
and
the
goal
it's
the
tic-tac-toe
game.
So.
A
C
Here
eager,
if
he
eager,
is
one
and
I'm
minus
one,
let's.
C
C
Right
all
right,
so
igor
won
the
game
because
he
made
it
a
column
of
we
call
numbers
so
igor
won
the
game
and
receive
it
10
years,
because
we
attach
it
five
years
each
so,
basically,
that's
it.
We
we
we
played
the
game,
won't
create
the
game
in
order
join
the
game
and
we
can.
We
can
play
and
see
the
board.
C
We
just
created
we,
we
started.
We
started
to
create
some
wireframes
here,
but
just
using
sigma
just
to
to
show
something.
A
C
C
C
Yeah
we
need
to
fill
the
board.
We
need
to
verify
the
board
if,
if
the,
if
the
the
player,
won't
that
won
that
round
or
not,
we
have
another
function,
called
a
view
board
where
it's
returning.
The
the
the
board,
like
I
show
here.
C
And
in
the
last
we
have
the
join
game
where
you
send
the
game
id
in
in.
You
are
attach
it
as
a
player
to
their
mouth
and
the
last
one
is
yeah.
That's
it.
I
think
we
have
another
other
and
other
functions
that
use
it
in
the
game,
but
not
exported
to
verify
and
to
do
other
kind
of
stuff.
C
B
C
A
C
Yeah,
this
is
the
contract
contract
can.
A
C
Yeah
sure,
let
me
see
how
I
can
do
that
if
I'm
still
recording.