3 added 84 characters in body
source | link

QBasic 1.1, 206206 186 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
IF RND<R=RND<.5THEN5
O=O+R
Z=Z-1
A(I)=0
ELSE
O=O-1R
A(I)=1
ENDIF=-R
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

-20 thanks to DLosc (newly-posted golfing trick).

Empty = 0
Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...

Output appears like this:

 A  B  C
 D  x  E
 F  G  H

Where A-H are 0/1 and x is the input.

QBasic 1.1, 206 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
IF RND<.5THEN
Z=Z-1
A(I)=0
ELSE
O=O-1
A(I)=1
ENDIF
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

Empty = 0
Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...

Output appears like this:

 A  B  C
 D  x  E
 F  G  H

Where A-H are 0/1 and x is the input.

QBasic 1.1, 206 186 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
R=RND<.5
O=O+R
Z=Z-1-R
A(I)=-R
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

-20 thanks to DLosc (newly-posted golfing trick).

Empty = 0
Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...

Output appears like this:

 A  B  C
 D  x  E
 F  G  H

Where A-H are 0/1 and x is the input.

2 added 114 characters in body
source | link

QBasic 1.1, 206 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
IF RND<.5THEN
Z=Z-1
A(I)=0
ELSE
O=O-1
A(I)=1
ENDIF
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

Empty = 0 
Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...

Output appears like this:

 A  B  C
 D  x  E
 F  G  H

Where A-H are 0/1 and x is the input.

QBasic 1.1, 206 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
IF RND<.5THEN
Z=Z-1
A(I)=0
ELSE
O=O-1
A(I)=1
ENDIF
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

Empty = 0 Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...

QBasic 1.1, 206 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
IF RND<.5THEN
Z=Z-1
A(I)=0
ELSE
O=O-1
A(I)=1
ENDIF
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

Empty = 0 
Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...

Output appears like this:

 A  B  C
 D  x  E
 F  G  H

Where A-H are 0/1 and x is the input.

1
source | link

QBasic 1.1, 206 bytes

RANDOMIZE TIMER
INPUT N
O=N
Z=8-N
FOR I=0TO 7
IF O*Z THEN
IF RND<.5THEN
Z=Z-1
A(I)=0
ELSE
O=O-1
A(I)=1
ENDIF
ELSEIF O THEN
O=O-1
A(I)=1
ELSE
Z=Z-1
A(I)=0
ENDIF
NEXT I
?A(0)A(1)A(2)
?A(3)N;A(4)
?A(5)A(6)A(7)

Empty = 0 Mine = 1

Note that 0 and 1 are integers, but I'm using STDOUT anyway, so...