
Play blackjack in Excel - karamazov
http://ironspread.com/blackjack.html
======
thanosbaskous
Excel can do some pretty impressive things.

Another cool-but-probably-useless example:

Excel as a 3d engine

[http://www.gamasutra.com/view/feature/131968/microsoft_excel...](http://www.gamasutra.com/view/feature/131968/microsoft_excel_revolutionary_3d_.php?print=1)

Check out the videos to get a quick understanding of what they did.

~~~
coroxout
Ha, that's great.

I knocked up a more or less working FreeCell solitaire in Excel one bored
afternoon, so Blackjack should certainly be possible in plain old Excel VBA.

Most impressive Excel things I've seen by other people: a Game of Life (I'm
guessing not SeanDav's, but who knows!), a Dijkstra's algorithm demo which let
you resize cells and recalculated the shortest distance between two cells, and
this rather impressive Enigma cipher encoder/decoder:
<http://news.ycombinator.com/item?id=3755656>

------
Ives
The same thing is possible in Excel VBA by creating a

Private Sub Worksheet_Change(ByVal Target As Range)

in the appropriate worksheet, which will be called when a cell is changed. I
don't see any reason why a complete blackjack game would be impossible.

I am however sure that the python code is much nicer than the VBA code to do
so, and if it weren't for the distribution trouble (requiring a plugin to be
installed for all users of the workbook) I'd definitely use IronSpread.

------
devmach
If it's python, if i'm able to use python modules and call functions from
excel ( udf ), why IronSpread folks pushes for useless demos ?

Show me some network stuff. Show me how can i write a simple crm ( no not like
the one on their blog ) " with " centeral db and gives me ability to work with
my coworkers together. Show me how can i gather information from different
sources ( web, db v.s. ) and analyse it.

------
dmboyd
Or there's always the lighter weight option pyspread[1] in which cells are
objects, works with numpy arrays and any module.

[1]: <http://manns.github.com/pyspread/>

------
K2h
I like the snarky remarks at the end of the code like: _dealer_says("Now I
have to go back to working as a VBA programmer!")_

------
SeanDav
For a bit of a laugh I wrote a Conway's Game of Life in Excel using cells as
pixels. I could get quite smooth animation up to a screen size of around
200x200 cells. The main bottleneck was the need to check every cell in the
grid, every generation, which quickly becomes hard for VBA to do smoothly. It
was fun however to see Excel doing animation.

------
josephagoss
Later year students have taken control of our entire pilot plant for our
electrical 'controls and instrumentation' engineering with excel.

Very impressive, I used to scoff at the engineers using excel (I'm a Computer
Science and Electrical Engineering student) but it can do some excellent
stuff.

------
chris_mahan
speaking of, it says on their FAQ that they will be able to call python
function from excel mid-july. Update? Or maybe we're talking a different year,
not 2012?

~~~
karamazov
This works! See our docs: <http://ironspread.com/docs.html#udf>

The FAQ is updated - thanks for pointing it out.

------
perssontm
I wouldnt be surprised if theese guys are beeing bought by MS sooner rather
than later.

Replacing VBA feels like it should be quite high on the priority list.

------
robomartin
Probably a cool way to learn and apply Python too.

------
miratom
So? Play PacMan in excel:
[http://www.cypherhackz.net/archives/2006/10/05/play-
pacman-i...](http://www.cypherhackz.net/archives/2006/10/05/play-pacman-in-
excel/)

~~~
karamazov
We work with Excel 2007 and 2010 ;)

